How to create a highchart 3d Pie chart

Answered

Hi,
I am trying to generate a 3D pie chart using Highcharts, unfortunately a 3D pie chart type is not supported. I noticed that the “prepareDataFunction” specifies that it can be used for unsupported chart types. Is it possible to create a Highchart 3D pie chart using this functionality, and if so can you please provide a demo.
I was able to use Google Charts to do this, but I would prefer using Highcharts.
Thanks for your help
By the way, this is a great tool! I love it!
Kenny

1 answer

WebDataRocks Team WebDataRocks April 23, 2020

Hello, Kenny,
 
Thank you for your question and for your feedback.
 
The desired chart type can be implemented without using the prepareDataFunction.
It is enough to modify the data object in an appropriate way right before it is passed to Highcharts.
Please refer to the Highcharts documentation in order to get detailed information about such an object.
We have prepared an example demonstrating creation of the 3d pie chart. The data object is modified in the following way:

data.chart.options3d = {
enabled: true,
alpha: 45,
beta: 0
};
data.plotOptions = {};
data.plotOptions.pie = {
allowPointSelect: true,
cursor: "pointer",
depth: 35,
dataLabels: {
enabled: true,
format: "{point.name}"
}
};

As can be seen from the code snippet below, options3d and plotOptions.pie properties are added to the object before passing to Highcharts.
 
We hope it works well for you.
Do not hesitate to contact us in case additional questions occur.
 
Best regards,
WebDataRocks Team