RefreshData()

ChartData::RefreshData() method

Refreshes the chart data by reloading it from the source workbook.

void Aspose::Slides::Charts::ChartData::RefreshData() override

Exceptions

ExceptionDescription
System::InvalidOperationExceptionThrown when the workbook format is not supported, or when ChartData::get_DataSourceType is ChartDataSourceType::ExternalWorkbook and the external workbook cannot be accessed or loaded.

Remarks

If the chart uses an external workbook, the workbook must be accessible at the time of the call.

System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"presentationWithChart.pptx");
auto chart = System::ExplicitCast<IChart>(presentation->get_Slide(0)->get_Shape(0));
chart->get_ChartData()->RefreshData();

See Also