Reputation: 13
How to style legend type from rectangle box to circle?
pie chart using chartjs.org
Upvotes: 0
Views: 4398
Reputation: 1
put the dataset like this:
datasets: [{
data: [10, 20, 30],
backgroundColor: [
'red',
'orange',
'blue'
],
}]
Upvotes: 0
Reputation: 32879
You could accomplish so, by setting usePointStyle
property to true
for legend labels in your chart options, like this ...
options: {
legend: {
labels: {
usePointStyle: true //<-- set this
}
},
...
}
Upvotes: 2