radius: Number/String

radius property allows you to set the Pie/Doughnut chart’s (outer) radius. Value can either be in pixels (number – ex: 100) or percent (string – ex: “80%”). Percent values are relative to the plot area’s size. By default, a pie/doughnut chart’s size(radius) changes in order to best fit the indexLabels. This can lead to charts of different sizes in the same page. In order to override this behavior and set equal sizes to all pie/doughnut charts in a page, you can use radius property.


Default: Automatically calculate in order to best fit the indexLabels
Example: 200, 150, “90%”, “75%”

Notes
  • Pixel values are Numbers
  • Percent values are strings ex: “90%”
  • Percent values are relative to the minimum of plot area’s width or height.


var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
  data: [{
   type: "pie",
   radius:  "90%", 
 
  },
 ]
 .
 . 
});
chart.render();




Try it Yourself by Editing the Code below.

  Also See:    



If you have any questions, please feel free to ask in our forums.Ask Question