|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
this.updateChart();
|
|
|
},
|
|
|
updateChart() {
|
|
|
- if (!this.chartInstance || !this.data || this.data.length === 0) return;
|
|
|
+ if (!this.chartInstance || !this.data) return;
|
|
|
|
|
|
const sortedProductData = [...this.data].sort((a, b) => b.value - a.value);
|
|
|
const salvProName = sortedProductData.map((item) => item.name);
|