1
0
mirror of synced 2025-12-09 06:48:07 +08:00

柱状堆叠图不刷新

This commit is contained in:
qianlishi
2025-01-20 21:21:39 +08:00
parent e702f492dc
commit 3fa69ba46f

View File

@@ -1,6 +1,6 @@
<template>
<div :style="styleObj">
<v-chart ref="myVChart" :option="options" autoresize/>
<v-chart v-if="vChartVisible" ref="myVChart" :option="options" autoresize/>
</div>
</template>
@@ -16,6 +16,7 @@ export default {
},
data() {
return {
vChartVisible: true,
options: {
grid: {},
legend: {
@@ -605,9 +606,14 @@ export default {
this.options.xAxis.axisLabel = axisLabel;
}
}
this.options.series = series;
this.options.legend["data"] = legendName;
this.setOptionsLegendName(legendName);
this.vChartVisible = false
this.$nextTick(() => {
this.vChartVisible = true
})
},
},
};