Help w/ Pie Chart

Hello, I am new to using the Chart Package, and I was wondering if you can answer some of my questions.

1. Is there a way to remove the text labels in the chart? I am using a legend and I want the labels to appear there, but not on the chart itself. I tried setting ChartSeries.Styles[i].DisplayText = false, but that doesn't seem to work.

2. It seems like there is some invisible border in the chart, that I can't seem to get rid of. I removed the text from the chart, but the top of my chart still gets cut off at the top. Is there a way to get the chart to go all the way to the top.

3. Is there any plans to enhance the designer functionality for the charts? It seems like there are a lot of Properties in the designer, but there is no way for me to change the chart to a Pie chart and set the points in the series.

Thanks


3 Replies

JS Jeba S Syncfusion Team January 9, 2008 11:36 AM UTC

Hi Michael,

Thank you for your interest in Syncfusion Products.

1.Remove text labels from chart.

You can remove the text labels from the chart and keep it in the legend alone by handling the FilterItems event. Below is the

code snippets:


private void chartControl1_Legend_FilterItems(object sender, ChartLegendFilterItemsEventArgs e)
{
ChartSeries series1 = this.chartControl1.Series[0];
e.Items[0].Text = string.Format("Production {0}%", series1.Points[0].YValues[0]);
e.Items[1].Text = string.Format("Labour {0}%", series1.Points[1].YValues[0]);
e.Items[2].Text = string.Format("Facilities {0}%", series1.Points[2].YValues[0]);
e.Items[3].Text = string.Format("Taxes {0}%", series1.Points[3].YValues[0]);
e.Items[4].Text = string.Format("Insurance{0}%", series1.Points[4].YValues[0]);
e.Items[5].Text = string.Format("Licenses {0}%", series1.Points[5].YValues[0]);
e.Items[6].Text = string.Format("Legal {0}%", series1.Points[6].YValues[0]);
}


Please refer the sample and let us know if this helps.
http://websamples.syncfusion.com/samples/Chart.Windows/F70886/main.htm

2. a)Invisible border

Please provide some more details about the invisible border issue so that it will help us to provide a solution.

b)Chart cut off

You can make use of the ElementsSpacing property to control the spacing between border and the ChartControl.

this.chartControl1.ElementsSpacing = 10;



3.Enhance the designer functionality.

I have filed a Feature request with title "Enhance Chart wizard for persisting designer changes in runtime through serializer ". We have notified our development team on this regard and will get back to you once we hear back from them.

Currently you can make use of the Chart Wizard for Add series dynamically. It is a very convenient tool to setup the Chart during Design Time.

Key features of the Chart wizard:

1. Can create various types of chart.
2. Add series dynamically when the application is running.
3. Change the appearance of the chart with the various options that are provided to change the color palette, back color and title of the chart.
4. Customize the axes of the chart such as changing the range and labels.
5. Provides support for customization of the chart legend.
6. Customize the chart control's toolbar.
7.View a preview of the chart before applying changes to it.

For details about the Chard wizard , please refer the local documantation available through the Dashboard or Online documentation.

Kindly let us know if you need any further assistance.

Best Regards,
Jeba.








MS Michael Sabin January 9, 2008 02:49 PM UTC

Thanks for the help. I'll look into using the wizard in the future.



JS Jeba S Syncfusion Team January 10, 2008 05:22 AM UTC

Hi Michael,

Thank you for your update.

Regards,
Jeba.


Loader.
Up arrow icon