From: Daniel Correa Date: Tue, 9 Oct 2018 16:20:09 +0000 (-0500) Subject: Add aspectRatio property to responsive doc (#5756) X-Git-Tag: v2.7.3~1^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ba06a26fddde17285072f3a446679e9388b382f;p=thirdparty%2FChart.js.git Add aspectRatio property to responsive doc (#5756) --- diff --git a/docs/general/responsive.md b/docs/general/responsive.md index f410826b8..fd92aa494 100644 --- a/docs/general/responsive.md +++ b/docs/general/responsive.md @@ -16,6 +16,7 @@ Chart.js provides a [few options](#configuration-options) to enable responsivene | `responsive` | `Boolean` | `true` | Resizes the chart canvas when its container does ([important note...](#important-note)). | `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. +| `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. | `onResize` | `Function` | `null` | Called when a resize occurs. Gets passed two arguments: the chart instance and the new size. ## Important Note