fixed broken economy graph
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
import {getPlayerValue} from "../utils";
|
import {getPlayerValue} from "../utils";
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
import {onMounted, reactive, watch} from "vue";
|
import {onBeforeMount, onMounted, reactive, watch} from "vue";
|
||||||
|
|
||||||
import * as echarts from 'echarts/core';
|
import * as echarts from 'echarts/core';
|
||||||
import {
|
import {
|
||||||
@@ -166,6 +166,10 @@ export default {
|
|||||||
|
|
||||||
let myChart1, max_rounds
|
let myChart1, max_rounds
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
max_rounds = store.state.matchDetails.max_rounds ? store.state.matchDetails.max_rounds : 30
|
||||||
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
data.team.push(getTeamPlayer(store.state.matchDetails.stats, 1))
|
data.team.push(getTeamPlayer(store.state.matchDetails.stats, 1))
|
||||||
data.team.push(getTeamPlayer(store.state.matchDetails.stats, 2))
|
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});
|
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));
|
myChart1.setOption(optionGen(dataList, valueList));
|
||||||
|
Reference in New Issue
Block a user