Hi Yasmin,
Thank you for your patience.
Regarding leader line missing in pie chart:
A Leader Line is only helpful, when you have placed a data label away from a data point. So, it works only if we place the data label away from data point.
Please use the below code snippet to sets a leader line,
//Get the serie data labels
IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
//Set the leader lines
dataLabels.ShowLeaderLines = true;
dataLabels.Position = OfficeDataLabelPosition.Outside;
//Set Manual Layout position to long
chart.Series[0].DataPoints[0].DataLabels.Layout.ManualLayout.Left = 0.077142857142857138;
chart.Series[0].DataPoints[0].DataLabels.Layout.ManualLayout.Top = -0.05;
chart.Series[0].DataPoints[1].DataLabels.Layout.ManualLayout.Left = 0.07857142857142857;
chart.Series[0].DataPoints[1].DataLabels.Layout.ManualLayout.Top = 0.073999999999999858;
chart.Series[0].DataPoints[2].DataLabels.Layout.ManualLayout.Left = -0.10857142857142857;
chart.Series[0].DataPoints[2].DataLabels.Layout.ManualLayout.Top = -0.048; |
Please let us know if you need any further assistances in this.
Regards,
Ramaraj Marimuthu