forked from chartjs/Chart.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'angle' option to Polar Charts (chartjs#5279)
* added 'angle' option to polar charts. image comparison test is work in progress; not currently passing * removed unnecessary variable assignment * code cleanup based on PR; for 'angle' option on polarCharts * Made polar chart image comparison test pass by removing debug flag. Also explicitly marked _computeAngle as private. * Removed visibleCount computation in polar chart * split out code related to updating the radius in polar chart's update function, into it's own 'updateRadius' function * made updateRadius method private * fix linting error * updated polar charts to read custom angles from "chart.options.elements.arc.angle" instead of "chart.options.angle"
- Loading branch information
Showing
6 changed files
with
117 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"config": { | ||
"type": "polarArea", | ||
"data": { | ||
"labels": ["A", "B", "C", "D", "E"], | ||
"datasets": [{ | ||
"data": [11, 16, 21, 7, 10], | ||
"backgroundColor": [ | ||
"rgba(255, 99, 132, 0.8)", | ||
"rgba(54, 162, 235, 0.8)", | ||
"rgba(255, 206, 86, 0.8)", | ||
"rgba(75, 192, 192, 0.8)", | ||
"rgba(153, 102, 255, 0.8)", | ||
"rgba(255, 159, 64, 0.8)" | ||
] | ||
}] | ||
}, | ||
"options": { | ||
"elements": { | ||
"arc": { | ||
"angle": [ | ||
1.0566, 1.7566, 1.0566, 2.1566, 0.2566 | ||
] | ||
} | ||
}, | ||
"responsive": false, | ||
"legend": false, | ||
"title": false, | ||
"scale": { | ||
"display": false | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"config": { | ||
"type": "polarArea", | ||
"data": { | ||
"labels": ["A", "B", "C", "D", "E"], | ||
"datasets": [{ | ||
"data": [11, 16, 21, 7, 10], | ||
"backgroundColor": [ | ||
"rgba(255, 99, 132, 0.8)", | ||
"rgba(54, 162, 235, 0.8)", | ||
"rgba(255, 206, 86, 0.8)", | ||
"rgba(75, 192, 192, 0.8)", | ||
"rgba(153, 102, 255, 0.8)", | ||
"rgba(255, 159, 64, 0.8)" | ||
] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": false, | ||
"title": false, | ||
"scale": { | ||
"display": false | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters