mirror of
https://github.com/gosticks/web.git
synced 2026-10-06 06:37:07 +00:00
Merge pull request #118 from pi-hole/fix/doughnut-chart-bugs
Fix doughnut charts acting weird when resized
This commit is contained in:
@@ -79,7 +79,12 @@ export class GenericDoughnutChart extends Component {
|
||||
data={{
|
||||
datasets: [
|
||||
{
|
||||
data: this.props.data,
|
||||
// Make a copy of the data here. ChartJS does weird things
|
||||
// to the data, which React doesn't catch. This can cause
|
||||
// oddities such as one chart showing the other chart's
|
||||
// data. This behavior is fixed by sending ChartJS its own
|
||||
// copy of the data.
|
||||
data: [...this.props.data],
|
||||
backgroundColor: this.props.colors
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user