Chart.js
Chart.js copied to clipboard
Doughnut chart doesn't respect legend label box `useBorderRadius` setting
Expected behavior
Doughnut chart doesn't respect legend label box useBorderRadius setting
I'd expect the labels to have a rounded appearance, as with the bar but they are square.
Current behavior
The doughnut label boxes are square with no border radius.
Reproducible sample
https://codepen.io/n1c/pen/QwwLNqj
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
v4.4.8
Browser name and version
Chrome
Link to your project
No response
Hi @n1c!
You can just enable usePointStyle in the legend label options to get a circular shape, like this:
https://codepen.io/adrianbrs/pen/jEEqEwW
const legend = {
labels: {
usePointStyle: true
},
}
Anyway, I also think it's a good idea to respect the borderRadius option.
Great thanks for this.