RefreshData()

IChartData::RefreshData() method

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

virtual void Aspose::Slides::Charts::IChartData::RefreshData()=0

Exceptions

ExceptionDescription
System::InvalidOperationExceptionThrown when the workbook format is not supported, or when IChartData::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