angular2-chartjs
angular2-chartjs copied to clipboard
Update dataset on change rather than data
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.

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

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.