We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Piechart woes

Hi
For the life of it I can't fill a piechart programmatically. As long as I enter a series during design time it work, updating the chart during runtime does not.

I create a series like below (although this approach seems to be depracated or obsolete but the samples use it anyway).

The title gets displayed along with the word empty.

ChartSeries series = this.chartControl1.Model.NewSeries("Items");
chartControl1.Title.Text = "Title: Item types";
series.Points.Add(0, 30.0); series.Points.Add(1, 35.0); series.Points.Add(2, 0.0); series.Points.Add(3, 25.0);

series.Type = ChartSeriesType.Pie;
chartControl1.Series.Add(series);
chartControl1.Series3D = true;

I also tried adding .Refresh() & .Endupdate()
but to no avail.

Using as chart type column displays a chart with the correct values.

Obviously I'm missing something but I can't figure out what?

Any ideas?

Thanks,

PS. I also added statements like
chartControl1.Series[0].ConfigItems.PieItem.PieType = ChartPieType.Bevel;
chartControl1.Series[0].ConfigItems.PieItem.FillMode = ChartPieFillMode.AllPie;

or

series.Styles[0].Text = ...
from the samples. No luck.



1 Reply

MA Manohari Syncfusion Team October 11, 2008 02:13 AM UTC

Hi Rotwang,

Thanks for your interest in Syncfusion products.

I have tested for this issue and I was not able to reproduce the reported issue. However, I faced another issue with the sample code provided in version 6.3.1.8, ie "Parameter not valid" exception is thrown when the Series contains data point with value Zero [series.Points.Add(2,0.0)]

However this issue with adding zero as one of the YValue in pie ChartSeries has been fixed in our Latest version and the fix for this issue is available in our latest Weekly Development Build [6.4.0.3]

You can download the latest Weekly Develoment Build version 6.4.0.3 from the following link.

http://www.syncfusion.com/downloads/product/build.aspx

Unlock key:

If your Essential Studio license is current, you will be able to obtain the key to install this version from your account in DirectTrac. Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com

I have attached the sample that works fine in this version in this link below.

http://websamples.syncfusion.com/samples/Chart.Windows/F76910/Sample1.htm

Kindly let us know if this helps in resolving your problem. Thanks for your patience.

Regards,
Manohari.R


Loader.
Live Chat Icon For mobile
Up arrow icon