(myChart, option, id)
| 16 | }, |
| 17 | methods: { |
| 18 | fixZomm(myChart, option, id) { |
| 19 | // 修复图表的zoom |
| 20 | // 每个图表的start end 都不一样 |
| 21 | if (!option.dataZoom) return; |
| 22 | if (!this.chartsZoom[id]) { |
| 23 | this.chartsZoom[id] = {} |
| 24 | } |
| 25 | option.dataZoom[0].start = this.chartsZoom[id].start; |
| 26 | option.dataZoom[0].end = this.chartsZoom[id].end; |
| 27 | if (this.chartsZoom[id].start == undefined) { |
| 28 | option.dataZoom[0].start = option.dataZoom[1].start |
| 29 | } |
| 30 | if (this.chartsZoom[id].end == undefined) { |
| 31 | option.dataZoom[0].end = option.dataZoom[1].end |
| 32 | } |
| 33 | |
| 34 | myChart.on('dataZoom', (event) => { |
| 35 | if (event.batch) { |
| 36 | this.chartsZoom[id].start = event.batch[0].start; |
| 37 | this.chartsZoom[id].end = event.batch[0].end; |
| 38 | } else { |
| 39 | this.chartsZoom[id].start = event.start; |
| 40 | this.chartsZoom[id].end = event.end; |
| 41 | }; |
| 42 | }); |
| 43 | }, |
| 44 | async initChart(myChart, chartOption, option, id, name) { |
| 45 | // echarts组件公用初始化代码' |
| 46 | let xOry = 'xAxis' |
nothing calls this directly
no outgoing calls
no test coverage detected