Commit 9a5f2aaf authored by leon's avatar leon

feat: line bar add datazoom event

parent c38f6c6c
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
chart.on('click', event => { chart.on('click', event => {
that.handleEchartsClick(event) that.handleEchartsClick(event)
}) })
chart.on('datazoom', event => {
that.echartsDataZoom(event)
})
return chart return chart
}, },
initChart() { initChart() {
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
chart.on('click', event => { chart.on('click', event => {
that.handleEchartsClick(event) that.handleEchartsClick(event)
}) })
chart.on('datazoom', event => {
that.echartsDataZoom(event)
})
return chart return chart
}, },
initChart() { initChart() {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
} }
} }
} }
}, },
dataZoom: that.elementInfo.dataZoom && that.elementInfo.dataZoom.show ? [{...that.elementInfo.dataZoom,...DATAZOOM_DEFAULT}] : [{show: false}], dataZoom: that.elementInfo.dataZoom && that.elementInfo.dataZoom.show ? [{...that.elementInfo.dataZoom,...DATAZOOM_DEFAULT}] : [{show: false}],
series: that.dealSeriesData(series) series: that.dealSeriesData(series)
} }
...@@ -72,6 +72,9 @@ ...@@ -72,6 +72,9 @@
chart.on('click', event => { chart.on('click', event => {
that.handleEchartsClick(event) that.handleEchartsClick(event)
}) })
chart.on('datazoom', event => {
that.echartsDataZoom(event)
})
return chart return chart
}, },
initChart() { initChart() {
...@@ -99,7 +102,8 @@ ...@@ -99,7 +102,8 @@
formatter: val => { formatter: val => {
return that.$u.common.converFunction(that.elementInfo.option.dataset return that.$u.common.converFunction(that.elementInfo.option.dataset
.formatter, val) .formatter, val)
} },
show: item.data.length > 10 ? false : true
} }
} }
return { return {
......
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