Skip to content

Commit 3287ada

Browse files
committed
Fix - Reset mutable config in config watcher
1 parent a9db65b commit 3287ada

30 files changed

+131
-1
lines changed

src/components/vue-ui-3d-bar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ watch(() => props.config, (_newCfg) => {
100100
prepareChart();
101101
titleStep.value += 1;
102102
tableStep.value += 1;
103+
104+
// Reset mutable config
105+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
103106
}, { deep: true });
104107
105108
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({

src/components/vue-ui-age-pyramid.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ watch(() => props.config, (_newCfg) => {
9999
prepareChart();
100100
titleStep.value += 1;
101101
tableStep.value += 1;
102+
103+
// Reset mutable config
104+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
105+
mutableConfig.value.showTooltip = FINAL_CONFIG.value.style.tooltip.show;
102106
}, { deep: true });
103107
104108
const resizeObserver = ref(null);

src/components/vue-ui-candlestick.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ watch(() => props.config, (_newCfg) => {
127127
slicerStep.value += 1;
128128
titleStep.value += 1;
129129
tableStep.value += 1;
130+
131+
// Reset mutable config
132+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
133+
mutableConfig.value.showTooltip = FINAL_CONFIG.value.style.tooltip.show;
130134
}, { deep: true });
131135
132136
watch(() => props.dataset, (newDs) => {

src/components/vue-ui-chestnut.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function prepareConfig() {
9292
watch(() => props.config, (_newCfg) => {
9393
FINAL_CONFIG.value = prepareConfig();
9494
userOptionsVisible.value = !FINAL_CONFIG.value.showOnChartHover;
95+
96+
// Reset mutable config
97+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
98+
9599
prepareChart();
96100
}, { deep: true });
97101

src/components/vue-ui-donut-evolution.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ watch(() => props.config, (_newCfg) => {
212212
titleStep.value += 1;
213213
tableStep.value += 1;
214214
legendStep.value += 1;
215+
216+
// Reset mutable config
217+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
215218
}, { deep: true });
216219
217220
watch(() => props.dataset, (_) => {

src/components/vue-ui-donut.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ watch(() => props.config, (_newCfg) => {
175175
titleStep.value += 1;
176176
tableStep.value += 1;
177177
legendStep.value += 1;
178+
179+
// Reset mutable config
180+
mutableConfig.value.dataLabels.show = FINAL_CONFIG.value.style.chart.layout.labels.dataLabels.show;
181+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
182+
mutableConfig.value.showTooltip = FINAL_CONFIG.value.style.chart.tooltip.show;
178183
}, { deep: true });
179184
180185
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({

src/components/vue-ui-dumbbell.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ watch(() => props.config, (_newCfg) => {
107107
legendStep.value += 1;
108108
baseRowHeight.value = FINAL_CONFIG.value.style.chart.rowHeight;
109109
baseWidth.value = FINAL_CONFIG.value.style.chart.width;
110+
111+
// Reset mutable config
112+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
110113
}, { deep: true });
111114
112115
watch(() => props.dataset, (_) => {

src/components/vue-ui-flow.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ watch(() => props.config, (_newCfg) => {
108108
userOptionsVisible.value = !FINAL_CONFIG.value.showOnChartHover;
109109
prepareChart();
110110
titleStep.value += 1;
111+
112+
// Reset mutable config
113+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
111114
}, { deep: true });
112115
113116
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({

src/components/vue-ui-funnel.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ watch(() => props.config, (_newCfg) => {
170170
fontSizes.value.names = FINAL_CONFIG.value.style.chart.bars.dataLabels.name.fontSize;
171171
fontSizes.value.values = FINAL_CONFIG.value.style.chart.bars.dataLabels.value.fontSize;
172172
173+
// Reset mutable config
174+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
173175
}, { deep: true });
174176
175177
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({

src/components/vue-ui-galaxy.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ watch(() => props.config, (_newCfg) => {
129129
titleStep.value += 1;
130130
tableStep.value += 1;
131131
legendStep.value += 1;
132+
133+
// Reset mutable config
134+
mutableConfig.value.dataLabels.show = FINAL_CONFIG.value.style.chart.layout.labels.dataLabels.show;
135+
mutableConfig.value.showTable = FINAL_CONFIG.value.table.show;
136+
mutableConfig.value.showTooltip = FINAL_CONFIG.value.style.chart.tooltip.show;
132137
}, { deep: true });
133138
134139
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({

0 commit comments

Comments
 (0)