I would like to be able to show the data labels on a chart that I’ve set the pivot source for. I know that you can usually do this via the Chart.NSeries[0].DataLabels.ShowValue property. However, because the chart is a PivotChart (Chart.PivotSource = “”), my NSeries collection is empty. How can I control the look and feel of the series on my PivotChart?
Hi,
I am afraid, the feature is not supported yet.
We have recently supported to manipulate pivot tables in v5.2.0 of the product, so now we can start working on your feature (manipulating pivot charts). We already added the feature into our issue tracking system with an id: CELLSNET-16205. Once we have any update about it, we will let you know.
Thank you.
Hi,
Do we now have any way to display Data labels on pivot charts?
Thanks,
Priya
Hi,
Hi,
Please change your sample code as following.
See the highlighted line.
C#
PivotTable pvt = workbook.Worksheets[0].PivotTables[0];
pvt.RefreshData();
pvt.CalculateData();
Chart chart = workbook.Worksheets[1].Charts[0];
chart.RefreshPivotData();//add this code
chart.NSeries[0].DataLabels.ShowValue = true; //Error
workbook.Save("e:\\test2\\gadddosdfasutput.xls");
Hi,
Hi,
For this I need to first save the excel with pivot chart and then open it to use its DataLabel.ShowValue property, can’t this be done without saving the file, as my requirement is to use a template and create the resultant file on the fly?
Thanks,
Priya
Hi,