get_DefaultLabelShapeType()

IDataLabelCollection::get_DefaultLabelShapeType() method

Gets the default shape type for data labels. Returns ShapeType::NotDefined if no shape is defined.

virtual ShapeType Aspose::Slides::Charts::IDataLabelCollection::get_DefaultLabelShapeType()=0

Remarks

Setting this property also sets the IDataLabel::LabelShapeType property for all data labels in the collection to the same value.

auto pres = System::MakeObject<Presentation>(u"Chart.pptx");
auto chart = System::ExplicitCast<IChart>(pres->get_Slide(0)->get_Shape(1));
auto firstSeries = chart->get_ChartData()->get_ChartSeries(0);

// Set the shape type of all data labels in the first series to Ellipse.
firstSeries->get_Labels()->set_DefaultLabelShapeType(ShapeType::Ellipse);

pres->Save(u"ChartWithEllipseLabels.pptx", SaveFormat::Pptx);

See Also