Skip to content

Add custom angles to polar area graph#4752

Closed
MarioIannotta wants to merge 4 commits intochartjs:masterfrom
MarioIannotta:master
Closed

Add custom angles to polar area graph#4752
MarioIannotta wants to merge 4 commits intochartjs:masterfrom
MarioIannotta:master

Conversation

@MarioIannotta
Copy link

Old Behavior

Every angle is 360/#values °

New Behavior

Provide custom value for each angle of the polar graph.

Solution

  	var options = {
 		type: 'polarArea',
 		data: {
 		labels: ["A", "B", "C", "D", "E"],
 		datasets: [{}]
 		},
 		options: {
 			customAngles: [
 				1.0566, 1.7566, 1.0566, 2.1566, 0.2566
 			]
 		}
 	}

Live demo:
https://codepen.io/anon/pen/ZXEmQm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant