fix-attempt for damage chart not loading initially

This commit is contained in:
cnachtigall1991
2021-10-17 01:56:49 +02:00
parent 0fb2371c60
commit 6ffd7685ab
3 changed files with 28 additions and 26 deletions

View File

@@ -85,7 +85,7 @@ export default {
}
}
let myChart1, myChart2, option1, option2
let myChart1, myChart2
onMounted(() => {
if (store.state.matchDetails.stats) {
@@ -101,11 +101,9 @@ export default {
myChart1 = echarts.init(document.getElementById('flash-chart-1'), {}, {width: 600, height: 400});
myChart2 = echarts.init(document.getElementById('flash-chart-2'), {}, {width: 600, height: 400});
option1 = setOptions(1, color)
option2 = setOptions(2, color)
myChart1.setOption(option1);
myChart2.setOption(option2);
myChart1.setOption(setOptions(1, color));
myChart2.setOption(setOptions(2, color));
}
})
}