Commit 90a8f0d8 authored by leon's avatar leon

feat: datazoom drag when back from FullScreen

parent fba69cd3
...@@ -187,18 +187,13 @@ ...@@ -187,18 +187,13 @@
} }
lastCount = count lastCount = count
if(flag) { if(flag) {
var option = chart.getOption() const series = this.ec.option.series
// TODO:切换全屏后返回,chart实例不存在了
if(!option) {
// 这样处理没有效果
option = this.ec.option
return
}
const series = option.series
series.map(item => { series.map(item => {
item.label.show = count <= this.elementInfo.option.dataset.maxCount item.label.show = count <= this.elementInfo.option.dataset.maxCount
}) })
chart.setOption({series: series}) this.$set(this.ec.option, 'series', series)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
...@@ -177,18 +177,13 @@ ...@@ -177,18 +177,13 @@
} }
lastCount = count lastCount = count
if(flag) { if(flag) {
var option = chart.getOption() const series = this.ec.option.series
// TODO:切换全屏后返回,chart实例不存在了
if(!option) {
// 这样处理没有效果
option = this.ec.option
return
}
const series = option.series
series.map(item => { series.map(item => {
item.label.show = count <= this.elementInfo.option.dataset.maxCount item.label.show = count <= this.elementInfo.option.dataset.maxCount
}) })
chart.setOption({series: series}) this.$set(this.ec.option, 'series', series)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
...@@ -154,18 +154,13 @@ ...@@ -154,18 +154,13 @@
} }
lastCount = count lastCount = count
if(flag) { if(flag) {
var option = chart.getOption() const series = this.ec.option.series
// TODO:切换全屏后返回,chart实例不存在了
if(!option) {
// 这样处理没有效果
option = this.ec.option
return
}
const series = option.series
series.map(item => { series.map(item => {
item.label.show = count <= this.elementInfo.option.dataset.maxCount item.label.show = count <= this.elementInfo.option.dataset.maxCount
}) })
chart.setOption({series: series}) this.$set(this.ec.option, 'series', series)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
...@@ -156,18 +156,13 @@ ...@@ -156,18 +156,13 @@
} }
lastCount = count lastCount = count
if(flag) { if(flag) {
var option = chart.getOption() const series = this.ec.option.series
// TODO:切换全屏后返回,chart实例不存在了
if(!option) {
// 这样处理没有效果
option = this.ec.option
return
}
const series = option.series
series.map(item => { series.map(item => {
item.label.show = count <= this.elementInfo.option.dataset.maxCount item.label.show = count <= this.elementInfo.option.dataset.maxCount
}) })
chart.setOption({series: series}) this.$set(this.ec.option, 'series', series)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment