Commit ac5cf17b authored by leon's avatar leon

fix: old dataZoom is null

parent 05ea2f9f
......@@ -74,7 +74,7 @@
...this.elementInfo.option.yAxis,
data: this.dealSeriesData(series).categories
},
dataZoom: this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
dataZoom: this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
series: {
id: 'associate',
type: 'bar',
......
......@@ -49,7 +49,7 @@
...this.elementInfo.option.tooltip,
trigger: "axis"
},
dataZoom: this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
dataZoom: this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
series: this.dealSeriesData(series)
}
chart.setOption(this.ec.option)
......@@ -84,7 +84,7 @@
const { categories, series, preview, images } = this.elementData.dataList
this.$set(this.ec.option, 'yAxis.data', categories)
this.$set(this.ec.option, 'series', this.dealSeriesData(series))
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
if(preview) {
this.cacheImages(images)
}
......
......@@ -58,7 +58,7 @@
...this.elementInfo.option.tooltip,
trigger: "axis"
},
dataZoom: this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
dataZoom: this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
series: this.dealSeriesData(series)
}
chart.setOption(this.ec.option)
......@@ -71,7 +71,7 @@
const {categories, series } = this.elementData.dataList
this.$set(this.ec.option, 'xAxis.data', categories)
this.$set(this.ec.option, 'series', this.dealSeriesData(series))
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
},
/**
* 处理数据
......
......@@ -44,7 +44,7 @@
...this.elementInfo.option.tooltip,
trigger: "axis"
},
dataZoom: this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
dataZoom: this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
series: this.dealSeriesData(series)
}
chart.setOption(this.ec.option)
......@@ -57,7 +57,7 @@
const { categories, series } = this.elementData.dataList
this.$set(this.ec.option, 'xAxis.data', categories)
this.$set(this.ec.option, 'series', this.dealSeriesData(series))
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
},
/**
* 处理数据
......
......@@ -46,7 +46,7 @@
...this.elementInfo.option.tooltip,
trigger: "axis"
},
dataZoom: this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
dataZoom: this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [],
series: this.dealSeriesData(series)
}
chart.setOption(this.ec.option)
......@@ -59,7 +59,7 @@
const { categories, series } = this.elementData.dataList
this.$set(this.ec.option, 'xAxis.data', categories)
this.$set(this.ec.option, 'series', this.dealSeriesData(series))
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
this.$set(this.ec.option, 'dataZoom', this.elementInfo.dataZoom && this.elementInfo.dataZoom.show ? this.elementInfo.dataZoom : [])
},
/**
* 处理数据
......
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