This example demonstrates how to create a simple Pie Chart using CanvasJS Chart plugin for jQuery. To know more about the available features please refer to our getting started section.
Once the chart has been rendered, you can get a reference to it by calling CanvasJSChart method on the DOM element without passing any parameter as shown below. Once you have the reference you can update the chart by changing its options.
var chart = $(".chartContainer").CanvasJSChart();
chart.options.title.text += ": Updated";
chart.render();
Please look into the reference section for all the supported options.
8 Comments
i need to decrease the line width of canvas js of doughnut pie chart pls anyone reply me.
jainy,
You can use indexLabelLineThickness for the same.
How to change the background color of the legends and the pie’s
yaseen,
Did you mean to say changing dataPoint’s color?
Hi..How can i get multilevel pie charts
arun,
Multilevel pie chart is not available yet.
How can I make a pop-up PIE-CHART ?
This looks simple, I need more fancy looking chart
Rustam,
You can achieve this using jQuery & any of the available jQuery Plugins. We are doing the same in our gallery using jQuery UI Dialog.