This project has moved and is read-only. For the latest updates, please go here.

PieChart DataLabel Format Code

Dec 6, 2014 at 1:57 PM
Edited Dec 6, 2014 at 2:01 PM
I want to apply a format code to the percentage values on chart to hide zeros
But I can't find any options for FormatCode in DataLabel or anywhere in a chart
Below code did no help either, it ads the c:numFmt but zeroes are still visible and number format is General
var xml = excelChart.ChartXml;
XmlElement xmlElement = xml.CreateElement("c", "numFmt",");
XmlAttribute formatCode = xml.CreateAttribute("formatCode");
XmlAttribute sourceLinked = xml.CreateAttribute("sourceLinked");
sourceLinked.Value = "1";
formatCode.Value = "%0,#0;-0;";