fix: CSAT chart showing incorrect data (#7152)
* fix: computation of data for csat chart * fix: make horizontal chart reactive
This commit is contained in:
@@ -45,6 +45,14 @@ export default {
|
|||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
collection() {
|
||||||
|
this.renderChart(this.collection, {
|
||||||
|
...chartOptions,
|
||||||
|
...this.chartOptions,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.renderChart(this.collection, {
|
this.renderChart(this.collection, {
|
||||||
...chartOptions,
|
...chartOptions,
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ export default {
|
|||||||
chartData() {
|
chartData() {
|
||||||
return {
|
return {
|
||||||
labels: ['Rating'],
|
labels: ['Rating'],
|
||||||
datasets: CSAT_RATINGS.map((rating, index) => ({
|
datasets: CSAT_RATINGS.map(rating => ({
|
||||||
label: rating.emoji,
|
label: rating.emoji,
|
||||||
data: [this.ratingPercentage[index + 1]],
|
data: [this.ratingPercentage[rating.value]],
|
||||||
backgroundColor: rating.color,
|
backgroundColor: rating.color,
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user