Merge pull request #10238 from scmmishra/chart-widget-color

fix: default light blue color for charts
This commit is contained in:
Shivam Mishra 2020-05-06 13:59:20 +05:30 committed by GitHub
commit d62706620f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -480,7 +480,7 @@ export default class ChartWidget extends Widget {
colors.push(field.color);
});
} else if (["Line", "Bar"].includes(this.chart_doc.type)) {
colors = [this.chart_doc.color || "light-blue"];
colors = [this.chart_doc.color || []];
}
if (!this.data || !this.data.labels.length || !Object.keys(this.data).length) {