]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add aspectRatio property to responsive doc (#5756)
authorDaniel Correa <danielc.web@gmail.com>
Tue, 9 Oct 2018 16:20:09 +0000 (11:20 -0500)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Tue, 9 Oct 2018 16:20:09 +0000 (18:20 +0200)
docs/general/responsive.md

index f410826b84f04889bb9e4f07a485243c682f9fec..fd92aa494f0ae41fab3acb734c20c594a4a5036f 100644 (file)
@@ -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