Aspose::Slides::Charts::ChartData Class Reference

Represents data used for a chart plotting. More...

Inherits Aspose::Slides::Charts::IChartData, and Aspose::Slides::IDOMObject.

Public Member Functions

ASPOSE_SLIDES_SHARED_API System::SharedPtr< IChartDataWorkbookget_ChartDataWorkbook ()
 Gets the cells factory to create cells used for chart series or categories. Read-only IChartDataWorkbook. More...
 
ASPOSE_SLIDES_SHARED_API System::SharedPtr< IChartSeriesCollectionget_Series ()
 Gets the series. Read-only IChartSeriesCollection. More...
 
ASPOSE_SLIDES_SHARED_API System::SharedPtr< IChartSeriesGroupCollectionget_SeriesGroups ()
 Gets the groups of series. Read-only IChartSeriesGroupCollection. More...
 
ASPOSE_SLIDES_SHARED_API System::SharedPtr< IChartCategoryCollectionget_Categories ()
 Gets the primary categories (or both primary and secondary categories if UseSecondaryCategories property is false). Read-only IChartCategoryCollection. More...
 
ASPOSE_SLIDES_SHARED_API bool get_UseSecondaryCategories ()
 If false then SecondaryCategories property return null and data in Categories property is used both for primary and secondary series. If true then data in SecondaryCategories property is used for secondary series and data in Categories property is used for primary series. Example. What categories are related to series - ChartData.Categories or ChartData.SecondaryCategories? More...
 
ASPOSE_SLIDES_SHARED_API void set_UseSecondaryCategories (bool value)
 If false then SecondaryCategories property return null and data in Categories property is used both for primary and secondary series. If true then data in SecondaryCategories property is used for secondary series and data in Categories property is used for primary series. Example. What categories are related to series - ChartData.Categories or ChartData.SecondaryCategories? More...
 
ASPOSE_SLIDES_SHARED_API System::SharedPtr< IChartCategoryCollectionget_SecondaryCategories ()
 Gets the secondary categories if UseSecondaryCategories property is true. Read-only IChartCategoryCollection. More...
 
ASPOSE_SLIDES_SHARED_API ChartDataSourceType get_DataSourceType ()
 Represents external workbook path if external data source, null otherwise More...
 
ASPOSE_SLIDES_SHARED_API System::String get_ExternalWorkbookPath ()
 Represents data source of the chart More...
 
ASPOSE_SLIDES_SHARED_API System::SharedPtr< System::IO::MemoryStream > ReadWorkbookStream ()
 Writes the internally contained Excel workbook it into an in-memory stream. More...
 
ASPOSE_SLIDES_SHARED_API void WriteWorkbookStream (System::SharedPtr< System::IO::MemoryStream > ms)
 Initializes the internally contained Excel workbook with user-specified value. More...
 
ASPOSE_SLIDES_SHARED_API void SetRange (System::String formula)
 Set chart data range. Series and categories will be updated based on new data range. More...
 
ASPOSE_SLIDES_SHARED_API void SwitchRowColumn ()
 Swap the data over the axis. Data being charted on the X axis will move to the Y axis and vice versa. More...
 

Protected Member Functions

System::SharedPtr< Chartget_ChartInternal ()
 Returns the parent chart. Read-only IChart. More...
 
bool get_DrawChartFromChartCache ()
 Determines data source for rendering (chart cache or workbook) More...
 
void set_DrawChartFromChartCache (bool value)
 Determines data source for rendering (chart cache or workbook) More...
 
 ChartData (System::SharedPtr< Chart > parentImmediate)
 
bool WriteWorkbookStreamAndCheckSheets (System::SharedPtr< System::IO::MemoryStream > ms, System::SharedPtr< System::Collections::Generic::List< System::String >> namesToCheckResolve)
 Initializes the internally contained Excel workbook with user-specified value (if checking sheets by its names is successful) or with empty workbook. More...
 
void SetSeriesToPosition (int32_t index, System::SharedPtr< IChartSeries > series)
 

Detailed Description

Represents data used for a chart plotting.

Constructor & Destructor Documentation

◆ ChartData()

Aspose::Slides::Charts::ChartData::ChartData ( System::SharedPtr< Chart parentImmediate)
protected

Member Function Documentation

◆ get_Categories()

ASPOSE_SLIDES_SHARED_API System::SharedPtr<IChartCategoryCollection> Aspose::Slides::Charts::ChartData::get_Categories ( )
virtual

Gets the primary categories (or both primary and secondary categories if UseSecondaryCategories property is false). Read-only IChartCategoryCollection.

If UseSecondaryCategories property is false then SecondaryCategories property return null and data in this Categories property is used both for primary and secondary series. If UseSecondaryCategories property is true then data in SecondaryCategories property is used for secondary series and data in this Categories property is used for primary series.

Example. What categories are related to series - ChartData.Categories or ChartData.SecondaryCategories?

if (series->get_PlotOnSecondAxis() &amp;&amp; series->get_Chart()->get_ChartData()->get_UseSecondaryCategories())
{
// related categories are series->get_Chart()->get_ChartData()->get_SecondaryCategories()
}
else
{
// related categories are series->get_Chart()->get_ChartData()->get_Categories()
}

Implements Aspose::Slides::Charts::IChartData.

◆ get_ChartDataWorkbook()

ASPOSE_SLIDES_SHARED_API System::SharedPtr<IChartDataWorkbook> Aspose::Slides::Charts::ChartData::get_ChartDataWorkbook ( )
virtual

Gets the cells factory to create cells used for chart series or categories. Read-only IChartDataWorkbook.

Implements Aspose::Slides::Charts::IChartData.

◆ get_ChartInternal()

System::SharedPtr<Chart> Aspose::Slides::Charts::ChartData::get_ChartInternal ( )
protected

Returns the parent chart. Read-only IChart.

◆ get_DataSourceType()

ASPOSE_SLIDES_SHARED_API ChartDataSourceType Aspose::Slides::Charts::ChartData::get_DataSourceType ( )
virtual

Represents external workbook path if external data source, null otherwise

Implements Aspose::Slides::Charts::IChartData.

◆ get_DrawChartFromChartCache()

bool Aspose::Slides::Charts::ChartData::get_DrawChartFromChartCache ( )
protected

Determines data source for rendering (chart cache or workbook)

◆ get_ExternalWorkbookPath()

ASPOSE_SLIDES_SHARED_API System::String Aspose::Slides::Charts::ChartData::get_ExternalWorkbookPath ( )
virtual

Represents data source of the chart

Implements Aspose::Slides::Charts::IChartData.

◆ get_SecondaryCategories()

ASPOSE_SLIDES_SHARED_API System::SharedPtr<IChartCategoryCollection> Aspose::Slides::Charts::ChartData::get_SecondaryCategories ( )
virtual

Gets the secondary categories if UseSecondaryCategories property is true. Read-only IChartCategoryCollection.

If UseSecondaryCategories property is false then this SecondaryCategories property return null and data in Categories property is used both for primary and secondary series. If UseSecondaryCategories property is true then data in this SecondaryCategories property is used for secondary series and data in Categories property is used for primary series.

Example. What categories are related to series - ChartData.Categories or ChartData.SecondaryCategories?

if (series->get_PlotOnSecondAxis() &amp;&amp; series->get_Chart()->get_ChartData()->get_UseSecondaryCategories())
{
// related categories are series->get_Chart()->get_ChartData()->get_SecondaryCategories()
}
else
{
// related categories are series->get_Chart()->get_ChartData()->get_Categories()
}

Implements Aspose::Slides::Charts::IChartData.

◆ get_Series()

ASPOSE_SLIDES_SHARED_API System::SharedPtr<IChartSeriesCollection> Aspose::Slides::Charts::ChartData::get_Series ( )
virtual

Gets the series. Read-only IChartSeriesCollection.

Implements Aspose::Slides::Charts::IChartData.

◆ get_SeriesGroups()

ASPOSE_SLIDES_SHARED_API System::SharedPtr<IChartSeriesGroupCollection> Aspose::Slides::Charts::ChartData::get_SeriesGroups ( )
virtual

Gets the groups of series. Read-only IChartSeriesGroupCollection.

1) Each group of series contains series with combinable types. Groups of combinable series types defined and described with CombinableSeriesTypesGroup enum. Also each group of series contains series witch is plotted whether on primary axes or on secondary axes (not both cases in one group). So, principle of series grouping is a grouping by type groups mentioned above and by primary/secondary plotting type.

2) Group of series contains some series properies whitch is common for each series in group ("series group properties"). "Series group properties" in ChartSeriesGroup class is read/write. Each of "series group properties" can have a read-only projection in ChartSeries class.

Implements Aspose::Slides::Charts::IChartData.

◆ get_UseSecondaryCategories()

ASPOSE_SLIDES_SHARED_API bool Aspose::Slides::Charts::ChartData::get_UseSecondaryCategories ( )
virtual

If false then SecondaryCategories property return null and data in Categories property is used both for primary and secondary series. If true then data in SecondaryCategories property is used for secondary series and data in Categories property is used for primary series. Example. What categories are related to series - ChartData.Categories or ChartData.SecondaryCategories?

if (series->get_PlotOnSecondAxis() && series->get_Chart()->get_ChartData()->get_UseSecondaryCategories()) { // related categories are series->get_Chart()->get_ChartData()->get_SecondaryCategories() } else { // related categories are series->get_Chart()->get_ChartData()->get_Categories() }

Read bool.

Implements Aspose::Slides::Charts::IChartData.

◆ ReadWorkbookStream()

ASPOSE_SLIDES_SHARED_API System::SharedPtr<System::IO::MemoryStream> Aspose::Slides::Charts::ChartData::ReadWorkbookStream ( )
virtual

Writes the internally contained Excel workbook it into an in-memory stream.

Returns
Returns an instance of MemoryStream containing a copy of the internally contained Excel workbook.

Implements Aspose::Slides::Charts::IChartData.

◆ set_DrawChartFromChartCache()

void Aspose::Slides::Charts::ChartData::set_DrawChartFromChartCache ( bool  value)
protected

Determines data source for rendering (chart cache or workbook)

◆ set_UseSecondaryCategories()

ASPOSE_SLIDES_SHARED_API void Aspose::Slides::Charts::ChartData::set_UseSecondaryCategories ( bool  value)
virtual

If false then SecondaryCategories property return null and data in Categories property is used both for primary and secondary series. If true then data in SecondaryCategories property is used for secondary series and data in Categories property is used for primary series. Example. What categories are related to series - ChartData.Categories or ChartData.SecondaryCategories?

if (series->get_PlotOnSecondAxis() && series->get_Chart()->get_ChartData()->get_UseSecondaryCategories()) { // related categories are series->get_Chart()->get_ChartData()->get_SecondaryCategories() } else { // related categories are series->get_Chart()->get_ChartData()->get_Categories() }

Write bool.

Implements Aspose::Slides::Charts::IChartData.

◆ SetRange()

ASPOSE_SLIDES_SHARED_API void Aspose::Slides::Charts::ChartData::SetRange ( System::String  formula)
virtual

Set chart data range. Series and categories will be updated based on new data range.

Parameters
formulaThe cells data range formula. E.g: "Sheet1!$A$1:$C$4" , "SomeSheetName!A1:B100", "Sheet1!$A$1:$B$5;Sheet1!$D$1:$D$5".
Exceptions
ArgumentNullExceptionformula is null.
ArgumentExceptionformula has incorrect format.

Implements Aspose::Slides::Charts::IChartData.

◆ SetSeriesToPosition()

void Aspose::Slides::Charts::ChartData::SetSeriesToPosition ( int32_t  index,
System::SharedPtr< IChartSeries series 
)
protected

◆ SwitchRowColumn()

ASPOSE_SLIDES_SHARED_API void Aspose::Slides::Charts::ChartData::SwitchRowColumn ( )
virtual

Swap the data over the axis. Data being charted on the X axis will move to the Y axis and vice versa.

Implements Aspose::Slides::Charts::IChartData.

◆ WriteWorkbookStream()

ASPOSE_SLIDES_SHARED_API void Aspose::Slides::Charts::ChartData::WriteWorkbookStream ( System::SharedPtr< System::IO::MemoryStream >  ms)
virtual

Initializes the internally contained Excel workbook with user-specified value.

Parameters
msThe user-supplied stream containing the entire Excel workbook.

Implements Aspose::Slides::Charts::IChartData.

◆ WriteWorkbookStreamAndCheckSheets()

bool Aspose::Slides::Charts::ChartData::WriteWorkbookStreamAndCheckSheets ( System::SharedPtr< System::IO::MemoryStream >  ms,
System::SharedPtr< System::Collections::Generic::List< System::String >>  namesToCheckResolve 
)
protected

Initializes the internally contained Excel workbook with user-specified value (if checking sheets by its names is successful) or with empty workbook.

Parameters
msThe user-supplied stream containing the entire Excel workbook.
namesToCheckResolveList of names whitch Excel workbook must can resolve.
Returns
Return true if "ms" stream is not null and Excel workbook can resolve all names in namesToCheckResolve list. Return false otherwise and initialize the internally contained Excel workbook with empty workbook.