From d464ba2831e5fe68b6d8fd4029e0eafa456cf791 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Sun, 16 Dec 2018 19:00:51 +0200 Subject: [PATCH] startAngle in degrees, 0 at top. --- docs/charts/polar.md | 2 +- src/controllers/controller.polarArea.js | 9 +++++---- src/scales/scale.radialLinear.js | 5 +---- test/specs/controller.polarArea.tests.js | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/charts/polar.md b/docs/charts/polar.md index 2ae8b5ec3dd..20c924274d2 100644 --- a/docs/charts/polar.md +++ b/docs/charts/polar.md @@ -59,7 +59,7 @@ These are the customisation options specific to Polar Area charts. These options | Name | Type | Default | Description | ---- | ---- | ------- | ----------- -| `startAngle` | `Number` | `-0.5 * Math.PI` | Starting angle to draw arcs for the first item in a dataset. +| `startAngle` | `Number` | `0` | Starting angle to draw arcs for the first item in a dataset. In degrees, 0 is top. | `animation.animateRotate` | `Boolean` | `true` | If true, the chart will animate in with a rotation animation. This property is in the `options.animation` object. | `animation.animateScale` | `Boolean` | `true` | If true, will animate scaling the chart from the center outwards. diff --git a/src/controllers/controller.polarArea.js b/src/controllers/controller.polarArea.js index fb045e30271..e6a23e3ada3 100644 --- a/src/controllers/controller.polarArea.js +++ b/src/controllers/controller.polarArea.js @@ -28,7 +28,7 @@ defaults._set('polarArea', { animateScale: true }, - startAngle: -0.5 * Math.PI, + startAngle: 0, legendCallback: function(chart) { var text = []; text.push('