[]
Gets the leader lines for the data labels.
Use the returned IChartLines object to access or modify the formatting of the leader lines associated with the data labels.
IChartLines LeaderLines { get; }
ReadOnly Property LeaderLines As IChartLines
worksheet.Range["A1:B4"].Value = new object[,] {
{"Category", "Value"},
{"A", 30},
{"B", 20},
{"C", 50}
};
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;
dataLabels.ShowLeaderLines = true;
IChartLines leaderLines = dataLabels.LeaderLines;
IChartFormat format = leaderLines.Format;