myLineChart.update(); // Calling update now animates the position of March from 90 to 50.
```
-> **Note:** replacing the data reference (e.g. `myLineChart.data = {datasets: [...]}` only works starting **version 2.6**. Prior that, replacing the entire data object could be achieved with the following workaround: `myLineChart.config.data = {datasets: [...]}`.
-
A `mode` string can be provided to indicate what should be updated and what animation configuration should be used. Core calls this method using any of `'active'`, `'hide'`, `'reset'`, `'resize'`, `'show'` or `undefined`. `'none'` is also a supported mode for skipping animations for single update. Please see [animations](../configuration/animations.mdx) docs for more details.
Example:
```javascript
-myChart.update();
+myChart.update('active');
```
See [Updating Charts](updates.md) for more details.
```javascript
const chart = Chart.getChart("canvas-id")
-```
\ No newline at end of file
+```