-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
Expected Behavior
Enabling the angleLines for a polarArea type chart should draw angleLines that align with the borders of a data segment.
Current Behavior
Data segment borders appear to be rendering at the correct (default) startAngle, but angleLines of the chart are about -1 degree off.
Possible Solution
Not a solution but my current workaround is this:
Since you can't change the startAngle
of the angleLines
, instead I change the options.startAngle
of the polar area chart data to -0.509 * Math.PI
(which makes it crooked, but aligned with the angleLines) and then also set a CSS transform (of transform: rotate(1.5deg)
) onto the canvas element itself to rotate the chart back to vertical. (See commented out parts of the jsfiddle)
Charts exported with toBase64Image()
are still crooked, since the CSS doesn't apply to them.
Steps to Reproduce (for bugs)
https://jsfiddle.net/8tn903pj/
Context
I need to be able to identify empty data segments on the polar area chart, so I need to show the angleLines.
Environment
- Chart.js version: ^2.7.3
- Browser name and version:Chrome 70/71 and Firefox 63/64