From e5dcf5d125f3e5abb813ece1e689dc78f9512a85 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Sat, 2 Mar 2019 10:08:39 +0200 Subject: [PATCH] workaround instead of breaking change, add regression test --- docs/charts/polar.md | 2 +- src/controllers/controller.polarArea.js | 12 ++---- src/scales/scale.radialLinear.js | 15 +++++--- .../controller.polarArea/angle-lines.json | 35 ++++++++++++++++++ .../controller.polarArea/angle-lines.png | Bin 0 -> 30736 bytes test/specs/controller.polarArea.tests.js | 2 +- 6 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 test/fixtures/controller.polarArea/angle-lines.json create mode 100644 test/fixtures/controller.polarArea/angle-lines.png diff --git a/docs/charts/polar.md b/docs/charts/polar.md index f46eea3b0a4..ff5baf27195 100644 --- a/docs/charts/polar.md +++ b/docs/charts/polar.md @@ -94,7 +94,7 @@ These are the customisation options specific to Polar Area charts. These options | Name | Type | Default | Description | ---- | ---- | ------- | ----------- -| `startAngle` | `number` | `0` | Starting angle to draw arcs for the first item in a dataset. In degrees, 0 is at top. +| `startAngle` | `number` | `-0.5 * Math.PI` | Starting angle to draw arcs for the first item in a dataset. | `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 160150e2644..33038aa8e81 100644 --- a/src/controllers/controller.polarArea.js +++ b/src/controllers/controller.polarArea.js @@ -30,7 +30,7 @@ defaults._set('polarArea', { animateScale: true }, - startAngle: 0, + startAngle: -0.5 * Math.PI, legendCallback: function(chart) { var text = []; text.push('