keep the state of selected legend

This commit is contained in:
MaysWind
2024-06-10 23:26:04 +08:00
parent 5107e451d8
commit 5fec41055e
+4 -1
View File
@@ -1,6 +1,6 @@
<template> <template>
<v-chart autoresize class="trends-chart-container" :class="{ 'transition-in': skeleton }" :option="chartOptions" <v-chart autoresize class="trends-chart-container" :class="{ 'transition-in': skeleton }" :option="chartOptions"
@click="clickItem" /> @click="clickItem" @legendselectchanged="onLegendSelectChanged" />
</template> </template>
<script> <script>
@@ -322,6 +322,9 @@ export default {
return color; return color;
}, },
onLegendSelectChanged: function (e) {
this.selectedLegends = e.selected;
},
getDisplayCurrency(value, currencyCode) { getDisplayCurrency(value, currencyCode) {
return this.$locale.getDisplayCurrency(value, currencyCode, { return this.$locale.getDisplayCurrency(value, currencyCode, {
currencyDisplayMode: this.settingsStore.appSettings.currencyDisplayMode, currencyDisplayMode: this.settingsStore.appSettings.currencyDisplayMode,