mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
3e94b9431a
Update the docs structure/content to use GitBook
646 B
646 B
Responsive Charts
Chart.js provides a few options for controlling resizing behaviour of charts.
Name | Type | Default | Description |
---|---|---|---|
responsive |
Boolean |
true |
Resizes the chart canvas when its container does. |
responsiveAnimationDuration |
Number |
0 |
Duration in milliseconds it takes to animate to new size after a resize event. |
maintainAspectRatio |
Boolean |
true |
Maintain the original canvas aspect ratio (width / height) when resizing. |
onResize |
Function |
null |
Called when a resize occurs. Gets passed two arguments: the chart instance and the new size. |