10๐
โ
I think what you are looking for is the reverse
option under legend which will show datasets in reverse order
http://www.chartjs.org/docs/latest/configuration/legend.html?h=reverse
1๐
Try giving it rotation
via options
in the Chart object.
new Chart(context, {
type: 'doughnut',
data: {
labels: [ 'Blue', 'Red' ],
datasets: [{
data: [7, 3],
backgroundColor: [
'rgba(54, 162, 235, 0.7)',
'rgba(208, 54, 100, 0.7)',
],
}]
},
options: {rotation: (0.5 * Math.PI)}
});
Fiddle: https://jsfiddle.net/zdh7591r/
Source:stackexchange.com