Skip to content

Commit

Permalink
Fix adding data to pie, doughnut, and polar area charts
Browse files Browse the repository at this point in the history
  • Loading branch information
etimberg committed Apr 23, 2016
1 parent d583a7b commit 8f0caed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/core.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,18 @@ module.exports = function(Chart) {
// Make sure dataset controllers are updated and new controllers are reset
var newControllers = this.buildOrUpdateControllers();

// Make sure all dataset controllers have correct meta data counts
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.buildOrUpdateElements();
});

Chart.layoutService.update(this, this.chart.width, this.chart.height);

// Can only reset the new controllers after the scales have been updated
helpers.each(newControllers, function(controller) {
controller.reset();
});

// Make sure all dataset controllers have correct meta data counts
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.buildOrUpdateElements();
});

// This will loop through any data and do the appropriate element update for the type
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.update();
Expand Down

0 comments on commit 8f0caed

Please sign in to comment.