From: Jukka Kurkela Date: Wed, 29 Jun 2022 11:46:00 +0000 (+0300) Subject: Update aspectRatio documentation (#10456) X-Git-Tag: v3.8.1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58e736a0b98e021e5ac1d340aa52d63eb3606573;p=thirdparty%2FChart.js.git Update aspectRatio documentation (#10456) --- diff --git a/docs/configuration/responsive.md b/docs/configuration/responsive.md index fbb99c463..9f3732d0f 100644 --- a/docs/configuration/responsive.md +++ b/docs/configuration/responsive.md @@ -18,7 +18,7 @@ Namespace: `options` | ---- | ---- | ------- | ----------- | `responsive` | `boolean` | `true` | Resizes the chart canvas when its container does ([important note...](#important-note)). | `maintainAspectRatio` | `boolean` | `true` | Maintain the original canvas aspect ratio `(width / height)` when resizing. -| `aspectRatio` | `number` | `2` | Canvas aspect ratio (i.e. `width / height`, a value of 1 representing a square canvas). Note that this option is ignored if the height is explicitly defined either as attribute or via the style. +| `aspectRatio` | `number` | `1`\|`2` | Canvas aspect ratio (i.e. `width / height`, a value of 1 representing a square canvas). Note that this option is ignored if the height is explicitly defined either as attribute or via the style. The default value varies by chart type; Radial charts (doughnut, pie, polarArea, radar) default to `1` and others default to `2`. | `onResize` | `function` | `null` | Called when a resize occurs. Gets passed two arguments: the chart instance and the new size. | `resizeDelay` | `number` | `0` | Delay the resize update by the given amount of milliseconds. This can ease the resize process by debouncing the update of the elements.