fixed broken economy graph

This commit is contained in:
cnachtigall1991
2021-10-19 21:29:24 +02:00
parent 4c4dbe9d7b
commit 68146ce8b4

View File

@@ -10,7 +10,7 @@
import {getPlayerValue} from "../utils";
import {useStore} from "vuex";
import {onMounted, reactive, watch} from "vue";
import {onBeforeMount, onMounted, reactive, watch} from "vue";
import * as echarts from 'echarts/core';
import {
@@ -166,6 +166,10 @@ export default {
let myChart1, max_rounds
onBeforeMount(() => {
max_rounds = store.state.matchDetails.max_rounds ? store.state.matchDetails.max_rounds : 30
})
onMounted(() => {
data.team.push(getTeamPlayer(store.state.matchDetails.stats, 1))
data.team.push(getTeamPlayer(store.state.matchDetails.stats, 2))
@@ -195,7 +199,6 @@ export default {
]);
myChart1 = echarts.init(document.getElementById('economy-graph'), {}, {width: 1200, height: 400});
max_rounds = store.state.matchDetails.max_rounds ? store.state.matchDetails.max_rounds : 30
}
myChart1.setOption(optionGen(dataList, valueList));