From a782abe3e9e86b351f608fb53f614f3d9f7e5f23 Mon Sep 17 00:00:00 2001 From: Saeid Date: Mon, 12 Oct 2020 19:53:01 +0330 Subject: [PATCH] fix: add chart --- resources/js/Global/plugins/chart/apexhart/type/pie.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/js/Global/plugins/chart/apexhart/type/pie.js b/resources/js/Global/plugins/chart/apexhart/type/pie.js index f88e141..5987ea1 100644 --- a/resources/js/Global/plugins/chart/apexhart/type/pie.js +++ b/resources/js/Global/plugins/chart/apexhart/type/pie.js @@ -21,7 +21,6 @@ export default class extends chart { }, series: [], labels: [], - colors: [], // label color legend: { fontSize: "16px" } @@ -37,8 +36,10 @@ export default class extends chart { setOptions() { this.options.series = this.responseChart.map(x => x.count); - this.options.labels = this.responseChart.map(x => x.category.name); - this.options.fill.label = this.responseChart.map(x => x.category.name); - this.options.colors = this.responseChart.map( x => x.category.color ? x.category.color : "#fff"); + this.options.labels = this.responseChart.map(x => x.category); + this.options.fill.labels = this.responseChart.map(x => x.category); + // this.options.labels = this.responseChart.map(x => x.category.name); + // this.options.fill.label = this.responseChart.map(x => x.category.name); + // this.options['colors'] = this.responseChart.map( x => x.category.color ? x.category.color : "#fff"); } }