How do I add data for a pie chart from code?
For example, what are the x and y values?
Adding Data to Pie Chart
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Adding Data to Pie Chart
Hello!
There are no 'x-values' in a pie series as such, as a pie series doesn't have axes. There are only 'y-values' which effectively represent the percentage of the pie taken.
A simple example may look like this:lilo wrote:How do I add data for a pie chart from code?
For example, what are the x and y values?
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Pie pie = new Pie(tChart1.Chart);
pie.Add(2);
pie.Add(3);
pie.Add(4);
pie.Circled = true;
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Adding Data to Pie Chart
Hi Christopher,
Thanks, this is what I was looking for.
Thanks, this is what I was looking for.