Set the Shape Type of Data Labels of Chart

Possible Usage Scenarios

You can change the shape type of data labels of the chart using the DataLabels.ShapeType property. It takes the value of DataLabelShapeType enumeration and changes the shape type of data labels accordingly. Some of its values are

DataLabelShapeType.BENT_LINE_CALLOUT

DataLabelShapeType.DOWN_ARROW_CALLOUT

DataLabelShapeType.ELLIPSE

DataLabelShapeType.LINE_CALLOUT

DataLabelShapeType.RECT

etc.

Set the Shape Type of Data Labels of Chart

The following sample code changes the shape type of data labels of the chart to DataLabelShapeType.WEDGE_ELLIPSE_CALLOUT. Please see the sample Excel file used in this code and the output Excel file generated by it. The screenshot shows the effect of the code on the sample Excel file.

todo:image_alt_text

Sample Code