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
close icon

Formatting PivotChart Data Labels

Hello,

I am now trying to format the data labels on a Pivot Chart. The chart is a pie chart, and i would like to show the data value, and a percentage if possible. I saw something about formatting using the chart's data series, but I am not sure how the data series works with the pivot table aspect of the chart. I tried accessing chart.Series[0], but that did not exist. At this point I am not sure i am braking up the right tree.

I am now using xlsio 13.2.0.9

3 Replies

MM Mathu Mohan Vijayakumar Syncfusion Team September 28, 2015 10:48 AM UTC

Hi Timothy,

Thank you for using Syncfusion products.

Currently XlsIO have no support in “Formatting Data Labels in Pivot Chart”. We would like to inform you that we have logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. Please log on to our support website to check for further updates:

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,

Mathu Mohan V A             



AK Anand Kulkarni replied to Mathu Mohan Vijayakumar May 9, 2023 02:51 PM UTC

I'm trying to do the same thing in Blazor.

Is this feature available now?



Thanks,

Anand Kulkarni



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team May 10, 2023 11:35 AM UTC

Hi Anand,


We do not have direct support for this but can be achieved through a simple workaround.


When pivot chart is created with pivot table as data source, Syncfusion XlsIO cannot create the series because the range of the pivot table is different from normal worksheet range. This is the limitation of XlsIO. To use any chart series formatting, the series should be added manually.


Please use the below code snippet to add data labels for pivot chart series.


pivotChart.Series.Add(ExcelChartType.Column_Stacked);

 

IChartSerie serie = pivotChart.Series[0];

 

//Set data labels color

serie.DataPoints.DefaultDataPoint.DataLabels.Color = ExcelKnownColors.Blue;

serie.DataPoints.DefaultDataPoint.DataLabels.IsValue = true;

serie.DataPoints.DefaultDataPoint.DataLabels.Position = ExcelDataLabelPosition.OutsideBase;


Regards,

Keerthi.



Loader.
Live Chat Icon For mobile
Up arrow icon