Skip to content

Commit

Permalink
Add a note to the perf documentation about rotation (#6585)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored and etimberg committed Oct 23, 2019
1 parent cec2d26 commit c6c991d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/general/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Chart.js charts are rendered on `canvas` elements, which makes rendering quite fast. For large datasets or performance sensitive applications, you may wish to consider the tips below:

* Set `animation: { duration: 0 }` to disable [animations](../configuration/animations.md).
* [Specify a rotation value](https://www.chartjs.org/docs/latest/axes/cartesian/#tick-configuration) by setting `minRotation` and `maxRotation` to the same value
* For large datasets:
* You may wish to sample your data before providing it to Chart.js. E.g. if you have a data point for each day, you may find it more performant to pass in a data point for each week instead
* Set the [`ticks.sampleSize`](../axes/cartesian/README.md#tick-configuration) option in order to render axes more quickly

0 comments on commit c6c991d

Please sign in to comment.