Commit 1083a173 authored by Pan's avatar Pan

fix chart bug

parent 535fe083
......@@ -35,7 +35,9 @@
this.initChart();
if (this.autoResize) {
this.__resizeHanlder = debounce(() => {
this.chart.resize()
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHanlder)
}
......
......@@ -52,7 +52,7 @@
legend: {
x: 'center',
y: 'bottom',
data: ['industries', 'technology', 'gold', 'forex', 'forecasts', 'markets']
data: ['industries', 'technology', 'forex', 'gold', 'forecasts', 'markets']
},
calculable: true,
series: [
......@@ -65,7 +65,7 @@
{ value: 240, name: 'technology' },
{ value: 149, name: 'forex' },
{ value: 100, name: 'gold' },
{ value: 59, name: 'forecastsx' },
{ value: 59, name: 'forecasts' },
{ value: 49, name: 'markets' }
],
animationEasing: 'cubicInOut',
......
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