Skip to content

Commit 1083a17

Browse files
committed
fix chart bug
1 parent 535fe08 commit 1083a17

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/views/dashboard/editor/lineChart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
this.initChart();
3636
if (this.autoResize) {
3737
this.__resizeHanlder = debounce(() => {
38-
this.chart.resize()
38+
if (this.chart) {
39+
this.chart.resize()
40+
}
3941
}, 100)
4042
window.addEventListener('resize', this.__resizeHanlder)
4143
}

src/views/dashboard/editor/pieChart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
legend: {
5353
x: 'center',
5454
y: 'bottom',
55-
data: ['industries', 'technology', 'gold', 'forex', 'forecasts', 'markets']
55+
data: ['industries', 'technology', 'forex', 'gold', 'forecasts', 'markets']
5656
},
5757
calculable: true,
5858
series: [
@@ -65,7 +65,7 @@
6565
{ value: 240, name: 'technology' },
6666
{ value: 149, name: 'forex' },
6767
{ value: 100, name: 'gold' },
68-
{ value: 59, name: 'forecastsx' },
68+
{ value: 59, name: 'forecasts' },
6969
{ value: 49, name: 'markets' }
7070
],
7171
animationEasing: 'cubicInOut',

0 commit comments

Comments
 (0)