Skip to content

Commit 438f95a

Browse files
committed
fix: [active-users] Selected chart type when clear cache button is clicked
Problem: - When the selected chart type is set to a value other than the default value and the clear cache button is clicked, chart type in the header is incompatible with the chart itself Solution: - During the chart refresh, type in the seriesOptions is also assigned to the header to ensure compatibility.
1 parent 3f4a884 commit 438f95a

File tree

1 file changed

+4
-2
lines changed
  • frontend/express/public/javascripts/countly/vue/components

1 file changed

+4
-2
lines changed

frontend/express/public/javascripts/countly/vue/components/vis.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,8 @@
26162616
Vue.component("cly-chart-time", BaseLineChart.extend({
26172617
data: function() {
26182618
return {
2619-
forwardedSlots: ["chart-left", "chart-right"]
2619+
forwardedSlots: ["chart-left", "chart-right"],
2620+
chartType: 'line'
26202621
};
26212622
},
26222623
props: {
@@ -2733,6 +2734,7 @@
27332734
else if (!this.areNotesHidden) {
27342735
this.getGraphNotes();
27352736
}
2737+
this.chartType = this.seriesOptions?.type || 'line';
27362738
},
27372739
notesVisibility: function() {
27382740
if (!this.areNotesHidden) {
@@ -2745,7 +2747,7 @@
27452747
},
27462748
template: '<div class="cly-vue-chart" :class="chartClasses" :style="chartStyles">\
27472749
<div class="cly-vue-chart__echart bu-is-flex bu-is-flex-direction-column bu-is-flex-grow-1 bu-is-flex-shrink-1" style="min-height: 0">\
2748-
<chart-header :test-id="testId + \'-header\'" ref="header" :category="this.category" :hide-notation="this.hideNotation" v-if="!isChartEmpty" @series-toggle="onSeriesChange" :show-zoom="showZoom" :show-toggle="showToggle" :show-download="showDownload" @graph-notes-refresh="refresh" @notes-visibility="notesVisibility">\
2750+
<chart-header :test-id="testId + \'-header\'" ref="header" :chart-type="this.chartType" :category="this.category" :hide-notation="this.hideNotation" v-if="!isChartEmpty" @series-toggle="onSeriesChange" :show-zoom="showZoom" :show-toggle="showToggle" :show-download="showDownload" @graph-notes-refresh="refresh" @notes-visibility="notesVisibility">\
27492751
<template v-for="item in forwardedSlots" v-slot:[item]="slotScope">\
27502752
<slot :name="item" v-bind="slotScope"></slot>\
27512753
</template>\

0 commit comments

Comments
 (0)