mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
Fixed: StackedChart colors only showing on page load
This commit is contained in:
parent
06901c4aee
commit
6f7987a907
2 changed files with 7 additions and 3 deletions
|
@ -44,7 +44,13 @@ class StackedBarChart extends Component {
|
|||
|
||||
componentDidUpdate() {
|
||||
this.myChart.data.labels = this.props.data.labels;
|
||||
this.myChart.data.datasets = this.props.data.datasets;
|
||||
this.myChart.data.datasets = this.props.data.datasets.map((d, index) => {
|
||||
return {
|
||||
label: d.label,
|
||||
data: d.data,
|
||||
backgroundColor: colors.chartColors[index]
|
||||
};
|
||||
});
|
||||
this.myChart.update();
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ function getTotalRequestsData(indexerStats) {
|
|||
]
|
||||
};
|
||||
|
||||
console.log(data);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue