diversify chartcolors for doughnut & stackedbar

This commit is contained in:
twolaw
2022-05-14 19:39:24 +02:00
committed by Qstick
parent d56dc313b4
commit beabd10f06
3 changed files with 4 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ class DoughnutChart extends Component {
datasets: [{
label: this.props.title,
data: this.props.data.map((d) => d.value),
backgroundColor: colors.chartColors
backgroundColor: colors.chartColorsDiversified
}]
}
});

View File

@@ -41,7 +41,7 @@ class StackedBarChart extends Component {
return {
label: d.label,
data: d.data,
backgroundColor: colors.chartColors[index]
backgroundColor: colors.chartColorsDiversified[index]
};
})
}
@@ -54,7 +54,7 @@ class StackedBarChart extends Component {
return {
label: d.label,
data: d.data,
backgroundColor: colors.chartColors[index]
backgroundColor: colors.chartColorsDiversified[index]
};
});
this.myChart.update();