Hello all,
I'm using a basic Pie Chart version of the UltraChart in an application I'm developing that takes summary data, and then shows it to the user visually via the chart. The data source that I'm using contains 8 different items, but I'd like to limit what gets charted to only the top five. Is this possible? If so, can you provide code on how to achieve this?
Thanks,
Melissa
Hello Melissa,
I`m not familiar with your scenario, but maybe you have two different options to acheive desired behaviour.
The first one is, if you are using series. In that case, you could include in your Points collection only desired items from your datasource.
The second approach (if you are working wihtout series), you should fillter your DataSource (for example using a Linq), you just fill another DataSource with desired items from your original DataSource.
Please note that our UltraChart just represent the data from your DataSource, so you should take a care about which data to be drawn in the chart.
Let me know if you have any questions.
Regards
Georgi,
Thanks for the response.
The issue that I'm having really revolves around the fact that the percentages portrayed on the pie chart aren't reflective of my true data. I was previously using a modified version based on LINQ of my data (5 instead of 8) to show in the pie chart, but by doing so, the percentages of "time used" in my data gets distorted to 10% instead of 8.7%, and so on.
I will try to research the Point collection on the UltraChart. Maybe this will fit what I need.
I don't think that the behavior is out of place for what the control is trying to do. The percentages aren't reflective because I'm using 8 items to calculate the percentages in labels above the pie chart, and then by only using 5 items in the pie chart data, it doesn't calculate the same way by default.
I was able to work around this issue by grouping the remaining three items together into one group called "Other", so that the percentages for the top five match the labels above, and the remaining percentage of the pie represents what's left of the 100%.
Thanks for the assistance,
This is very strange behavior. I try to reproduce it in a small sample, but without success. Are you able to upload your sample that reproduce this issue. I`ll be glad to research it for you. Also please tell me what is your current version and do you have any installed service release and which one. Are you using any custom label format ?