I would like to use a PieChart to display percentage of pinching reasons from a data set.
The reason and the number of counted stems are in two different columns in the data set.
From the same pinching reason multiple counting can be in the same data set.
I would like to have them accumulated counting of each reason displayed in the pie chart.
Now the chart shows the counting percentage of each individual record as pie value.
How to adjust this?
Peter
Hello Peter,
UltraChart control helps developers to visualize data as nice 2D or 3D charts. What UltraChart will display depends on the data source the developer will provide it. Speaking of Pie Chart you should provide a data source containing at least one numeric column. Then Pie Chart will visualize each row of data source provided as single pie depending on its numeric value. More about Pie Chart you may find in our online documentation in this article “Working with 2D Pie Chart Data”. Attached is a small sample showing how you can assign data to UltraChart.
In your case it seems that you need to summarize some data you have. Note that you should do this by yourself. UltraChart cannot summarize data from several data table and create a data source by itself. So summarize your data and assign the result as data source to your chart. Then UltraChart will visualize the result you passed through the data source.
Please let me know if you have any further questions on this matter.
Hello Milko,
Thank you kindly for your explanation. I have created data source objects implementing accumulations.
Now the Pie data displays the accumulated figures well.
Additional request on this subject is the image stile of the Pie.
How can you select another presentation style of the Pie. How it look like the Pie is hanging and you look on it from the bottom.
Can you adjust it to put it down and look on top of it?
And if you select a Pie part that it comes out?
Kind regards,
Thank you for your feedback.
I am glad to hear you were able to accumulate your data and to set your chart with correct data source.
Regarding your new questions. It seems that you are using 3D pie chart. To set the rotation of the chart you should set XRotation, YRotation and ZRotation properties of Transform3D like this:
this.ultraChart1.Transform3D.XRotation = 40;this.ultraChart1.Transform3D.YRotation = 40;this.ultraChart1.Transform3D.ZRotation = 180;
Check also the following article in our online documentation for additional information “Rotate 3D Charts”.
To explode particular slice you need to call BreakSlice method of the PieChart3D. Nice place to do this is ChartDataClicked event. In the event arguments of this event you have an access to the data row index of the slice the user has clicked. Get this index and pass it to BreakSlice method.
Attached is a small sample project showing how to rotate the 3D chart as well as how to explode pie chart slices.
Please let me know if any additional questions arise.