[]
Gets or sets whether percentage values are displayed in the data labels.
Use this property to determine whether the data labels for the series are configured to show percentage values.
bool ShowPercentage { get; set; }
Property ShowPercentage As Boolean
worksheet.Range["A1:B4"].Value = new object[,] {
{"Category", "Value"},
{"A", 10},
{"B", 20},
{"C", 30}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.Pie, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B4"]);
ISeries series = chart.SeriesCollection[0];
series.HasDataLabels = true;
IDataLabels dataLabels = series.DataLabels;
bool showPercentage = dataLabels.ShowPercentage;