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::MemoryStreamReadWorkbookStream ()
 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...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void SharedRefRemoved ()
 Decrements shared reference count and deletes object if it hits zero. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void FreeOrDetectCycles (int count)
 Reacts on shared reference counter decrement. Shouldn't be called directly, use smart pointers instead. If neccessary, deletes the object. If allowed, initiates loop references lookup. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
void __FreePointers ()
 Resets all smart pointers stored inside this object directly (in fields) or indirectly (in value type fields). Used by memory management systems, shouldn't be called directly. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

System::SharedPtr< Chartget_ChartInternal ()
 Returns the parent chart. Read-only IChart. More...
 
bool get_UseCache ()
 Determines data source for rendering (chart cache or workbook) More...
 
bool get_IsWorkbookLoaded ()
 Returns true if workbook is deserialized. More...
 
void set_IsWorkbookLoaded (bool value)
 Returns true if workbook is deserialized. More...
 
System::SharedPtr< System::IO::MemoryStreamget_EmbeddedWorkbookData ()
 Returns embedded workbook part. Returns null if embedded workbook is deserialized. More...
 
void set_EmbeddedWorkbookData (System::SharedPtr< System::IO::MemoryStream > value)
 Returns embedded workbook part. Returns null if embedded workbook is deserialized. More...
 
Aspose::Slides::XlsxSerialization::WorkbookType get_EmbeddedWorkbookType ()
 
void set_EmbeddedWorkbookType (Aspose::Slides::XlsxSerialization::WorkbookType value)
 
System::SharedPtr< IChartDataWorkbookInitWorkbookIfNeeded ()
 
 ChartData (System::SharedPtr< Chart > parentImmediate)
 
bool WriteWorkbookStreamAndCheckSheets (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< System::Collections::Generic::List< System::String >> namesToCheckResolve, System::SharedPtr< Aspose::Foundation::Blob::BlobManager > blobManager, System::SharedPtr< InterruptionToken > interruptionToken)
 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)
 
- Protected Member Functions inherited from System::Object
template<class Container , typename Value = typename Container::value_type>
std::enable_if<!System::IsSmartPtr< Value >::value &&!System::detail::is_a< Value, std::pair >::value, void >::type PopulateSharedMembers (Object::shared_members_type &, const char *, Container &)
 
template<class Container , typename Value = typename Container::value_type>
std::enable_if< System::IsSmartPtr< Value >::value, void >::type PopulateSharedMembers (Object::shared_members_type &data, const char *name, Container &container)
 
template<class Container , typename Value = typename Container::value_type>
std::enable_if< System::detail::is_a< Value, std::pair >::value &&!System::IsSmartPtr< typename Value::first_type >::value &&!System::IsSmartPtr< typename Value::second_type >::value, void >::type PopulateSharedMembers (Object::shared_members_type &, const char *, Container &)
 
template<class Container , typename Value = typename Container::value_type>
std::enable_if< System::detail::is_a< Value, std::pair >::value &&System::IsSmartPtr< typename Value::first_type >::value &&!System::IsSmartPtr< typename Value::second_type >::value, void >::type PopulateSharedMembers (Object::shared_members_type &data, const char *name, Container &container)
 
template<class Container , typename Value = typename Container::value_type>
std::enable_if< System::detail::is_a< Value, std::pair >::value &&!System::IsSmartPtr< typename Value::first_type >::value &&System::IsSmartPtr< typename Value::second_type >::value, void >::type PopulateSharedMembers (Object::shared_members_type &data, const char *name, Container &container)
 
template<class Container , typename Value = typename Container::value_type>
std::enable_if< System::detail::is_a< Value, std::pair >::value &&System::IsSmartPtr< typename Value::first_type >::value &&System::IsSmartPtr< typename Value::second_type >::value, void >::type PopulateSharedMembers (Object::shared_members_type &data, const char *name, Container &container)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
- Protected Types inherited from System::Object
template<class T >
using supports_free_pointers = decltype(__SupportsFreePointers(std::declval< T * >()))
 Checks if T type supports __FreePointers() method. More...
 
- Static Protected Member Functions inherited from System::Object
template<class T , class Check = decltype(std::declval<T*>()->__FreePointers())>
static std::true_type __SupportsFreePointers (T *)
 Formal function for template magic to check if type T supports __FreePointers() method. More...
 
static std::false_type __SupportsFreePointers (...)
 Formal function for template magic to check if type T supports __FreePointers() method. More...
 
template<class T >
static std::enable_if< supports_free_pointers< T >::value, void >::type __DoFreePointers (T &t)
 
template<class T >
static std::enable_if<!supports_free_pointers< T >::value &&!std::is_fundamental< T >::value &&!std::is_enum< T >::value &&!std::is_const< T >::value, void >::type __DoFreePointers (const T &)
 
template<class T >
static std::enable_if<!supports_free_pointers< T >::value &&!std::is_fundamental< T >::value &&!std::is_enum< T >::value &&std::is_const< T >::value, void >::type __DoFreePointers (T &)
 
template<class T >
static std::enable_if< std::is_fundamental< T >::value||std::is_enum< T >::value, void >::type __DoFreePointers (T)
 

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_EmbeddedWorkbookData()

System::SharedPtr<System::IO::MemoryStream> Aspose::Slides::Charts::ChartData::get_EmbeddedWorkbookData ( )
protected

Returns embedded workbook part. Returns null if embedded workbook is deserialized.

◆ get_EmbeddedWorkbookType()

Aspose::Slides::XlsxSerialization::WorkbookType Aspose::Slides::Charts::ChartData::get_EmbeddedWorkbookType ( )
protected

◆ 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_IsWorkbookLoaded()

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

Returns true if workbook is deserialized.

◆ 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_UseCache()

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

Determines data source for rendering (chart cache or workbook)

◆ 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.

◆ InitWorkbookIfNeeded()

System::SharedPtr<IChartDataWorkbook> Aspose::Slides::Charts::ChartData::InitWorkbookIfNeeded ( )
protected

◆ 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_EmbeddedWorkbookData()

void Aspose::Slides::Charts::ChartData::set_EmbeddedWorkbookData ( System::SharedPtr< System::IO::MemoryStream value)
protected

Returns embedded workbook part. Returns null if embedded workbook is deserialized.

◆ set_EmbeddedWorkbookType()

void Aspose::Slides::Charts::ChartData::set_EmbeddedWorkbookType ( Aspose::Slides::XlsxSerialization::WorkbookType  value)
protected

◆ set_IsWorkbookLoaded()

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

Returns true if workbook is deserialized.

◆ 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::Stream stream,
System::SharedPtr< System::Collections::Generic::List< System::String >>  namesToCheckResolve,
System::SharedPtr< Aspose::Foundation::Blob::BlobManager >  blobManager,
System::SharedPtr< InterruptionToken interruptionToken 
)
protected

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

Parameters
streamThe user-supplied stream containing the entire Excel workbook.
namesToCheckResolveList of names whitch Excel workbook must can resolve.
blobManagerBlobManager instance to manage large resources related to this workbook, like worksheets.
interruptionTokenThe token to monitor for interruption requests.
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.