[Chartjs]-How can I rotate a pie chart in charts.js?

16👍

You Can use the

Rotation Options in chartjs

I’m using “Version: 2.1.6”

var options = {
   rotation: (-0.5 * Math.PI) - (25/180 * Math.PI)
}

var Chart = new Chart(ctx,{
  type: 'pie',
  data: data,
  options: options
});

Updated fiddle

2👍

You can rotate using CSS3:    JSFIDDLE DEMO

#canvas{
   width:300px;
   height:300px; 
   -ms-transform: rotate(-25.2deg); /* IE 9 */
   -webkit-transform: rotate(-25.2deg); /* Chrome, Safari, Opera */
   transform: rotate(-25.2deg);
}

Leave a comment