Evert Timberg 6f6b1b2d17
Doughnut/Pie chart border radius (#8682)
* Arc with rounded ends implementation
* End style option
* Working border radius implementation for arcs
* Linting
* Fix bug introduced when converting to new border object
* Fix bugs identified by tests
* Arc border radius tests
* Add test to cover small borderRadii
* Reduce the weight of the arc border implementation
* lint fix
2021-04-03 07:58:51 -04:00

37 lines
720 B
JavaScript

module.exports = {
config: {
type: 'doughnut',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [60, 15, 33, 44, 12],
// Radius is large enough to clip
borderRadius: 200,
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(255, 159, 64)',
'rgb(255, 205, 86)',
'rgb(75, 192, 192)',
'rgb(54, 162, 235)'
]
},
]
},
// options: {
// elements: {
// arc: {
// backgroundColor: 'transparent',
// borderColor: '#888',
// }
// },
// }
},
options: {
canvas: {
height: 256,
width: 512
}
}
};