|
|
|
@ -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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|