Skip to content

Commit

Permalink
Fix for #1265
Browse files Browse the repository at this point in the history
  • Loading branch information
santam85 committed Sep 18, 2020
1 parent 699499c commit e4e0d7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/ng2-charts/src/lib/base-chart.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ export class BaseChartDirective implements OnChanges, OnInit, OnDestroy, DoCheck
this.chart.data.datasets = this.datasets;
}
} else {
if (!this.datasets[0]) {
this.datasets[0] = {};
}

this.datasets[0].data = newDataValues;
this.datasets.splice(1); // Remove all elements but the first
}
Expand Down

0 comments on commit e4e0d7e

Please sign in to comment.