Pie Charts

Stimulsoft Reports.NET discussion
Post Reply
pauljza
Posts: 18
Joined: Mon Dec 08, 2008 3:04 am
Location: South Africa

Pie Charts

Post by pauljza »

Hi, I've got a table that looks like this:

Category|x|y|z|total

I am trying to generate a report with columns that have pie charts based on the x|y|z values. What I did was place a label on the databand and a pie chart.
To get the pie chart to work I set the List of Arguments to a text string (i.e. X;Y;Z) and then set the List of Values to a calculated values like below:

{Math.Round((double)(Table.X*10000/Table.Total)/100,2)};{Math.Round((double)(Table.Y*10000/Table.Total)/100,2)};{Math.Round((double)(Table.Z*10000/Table.Total)/100,2)}

This in accordance with a hint I picked up from the post at: http://forum.stimulsoft.com/Default.aspx?g=posts&t=1616

On the output, if I have values like x=0, y=0, z=1,total=1 then the chart shows up with the obvious 100% filled circle.
If I have values like x=2,y=4,z=0,total=6 then the series labels in the legend show up correctly (i.e. 33.33, 66.66 and 0.00) but the chart does not get displayed.

Any assistance would be greatly appreciated with this one.


Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Pie Charts

Post by Edward »

Hello,

Please find an example report in the attachment. This report illustrates using of the GetValue event of the Chart.

There are the following properties have been set in the chart:

CountData = 3 (or DataSource property)
For counting a current index inside of the chart's Series an int type variable has been added into the Dictionary.

Thank you.
Attachments
145.SeriesGetValueExample.mrt
(5.33 KiB) Downloaded 393 times
pauljza
Posts: 18
Joined: Mon Dec 08, 2008 3:04 am
Location: South Africa

Pie Charts

Post by pauljza »

Thanks, that definately works.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Pie Charts

Post by Edward »

Hi Pauljza,

Please let us know if any help is required.

Thank you.
Post Reply