fix: add chart

pull/26/head
Saeid 4 years ago
parent 1d438fb6f5
commit a782abe3e9

@ -21,7 +21,6 @@ export default class extends chart {
}, },
series: [], series: [],
labels: [], labels: [],
colors: [], // label color
legend: { legend: {
fontSize: "16px" fontSize: "16px"
} }
@ -37,8 +36,10 @@ export default class extends chart {
setOptions() { setOptions() {
this.options.series = this.responseChart.map(x => x.count); this.options.series = this.responseChart.map(x => x.count);
this.options.labels = this.responseChart.map(x => x.category.name); this.options.labels = this.responseChart.map(x => x.category);
this.options.fill.label = this.responseChart.map(x => x.category.name); this.options.fill.labels = this.responseChart.map(x => x.category);
this.options.colors = this.responseChart.map( x => x.category.color ? x.category.color : "#fff"); // 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");
} }
} }

Loading…
Cancel
Save