angular2-chartjs icon indicating copy to clipboard operation
angular2-chartjs copied to clipboard

Update dataset on change rather than data

Open Recodify opened this issue 7 years ago • 0 comments

Issue #48

Previous Behavior

When updating data the chart animation transitions from the Y axis as it would when initially binding data to the chart.

chartbefore

Expected Behavior

When updating data the chart animation should transition from the current position, not the y axis.

chartafter

Cause

Instead of setting the updated data on the existing dataset, a new dataset is created so the transition always appears as it does on the initial bind.

Solution

This PR addresses this problem by updating exist data sets, if they exist and have data.

Recodify avatar Dec 29 '18 14:12 Recodify