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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Category Data Labels on Pie Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

45288 Jun 15,2006 06:25 PM UTC Jun 19,2006 05:05 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Brian
Asked On June 15, 2006 06:25 PM UTC

I''m trying to create a pie chart with labels for each section of the pie along with the associated value. And I would pefer that it not be in a lengend. With my code shown below I am not able to get it to show the category labels. My data has a label in column B and the value (percentage) in column C. Is there something that I am doing wrong? Any suggestions would be great. Thanks, Brian ---------------------------------------------- IChartShape chart = _CurrentWorksheet.Charts.Add(); chart.ChartType = ExcelChartType.Pie_3D; chart.Series.Add(); chart.Series[0].CategoryLabels = _CurrentWorksheet.Range["B22:B27"]; chart.Series[0].Values = _CurrentWorksheet.Range["C22:C27"]; chart.IsLegendVisible = false; chart.LabelsSeparator = " "; chart.IsLabelsCategory = true; chart.IsLabelsValue = true;

Administrator [Syncfusion]
Replied On June 19, 2006 05:05 PM UTC

Hi Brian, Sorry for the delay in responding to you. Please use the following code for displaying values and labels in series. IChartDataPoint point = chart.Series[0].DataPoints.DefaultDataPoint; IChartDataLabels labels = point.DataLabels; //Setting labels in series. labels.IsCategoryName=true; //Setting value in series. labels.IsValue = true; Here is the sample for your reference:Chart_labels.zip Regarding setting labels in series, currently there are some issues in it. I will consult with the development team regarding this and send you an update as soon as possible. Please let me know if you have any other concerns. Thanks, Bharath.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;