ChartData

ChartData class

Represents data used for a chart plotting.

public class ChartData : DomObject<Chart>, IChartData

Properties

NameDescription
Categories { get; }Gets the primary categories (or both primary and secondary categories if UseSecondaryCategories property is false). Read-only IChartCategoryCollection.
ChartDataWorkbook { get; }Gets the cells factory to create cells used for chart series or categories. Read-only IChartDataWorkbook.
DataSourceType { get; }Represents external workbook path if external data source, null otherwise
ExternalWorkbookPath { get; }Represents data source of the chart
SecondaryCategories { get; }Gets the secondary categories if UseSecondaryCategories property is true. Read-only IChartCategoryCollection.
Series { get; }Gets the series. Read-only IChartSeriesCollection.
SeriesGroups { get; }Gets the groups of series. Read-only IChartSeriesGroupCollection.
UseSecondaryCategories { get; set; }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. Read/write Boolean.

Methods

NameDescription
GetRange()Gets chart data range.
ReadWorkbookStream()Writes the internally contained Excel workbook it into an in-memory stream.
SetExternalWorkbook(string)Sets external workbook as a data source for the chart. Chart data will be updated from the target workbook.
SetExternalWorkbook(string, bool)Sets external workbook as a data source for the chart.
SetRange(string)Set chart data range. Series and categories will be updated based on new data range. If amount of series in data range greater than count of series in the chart data then additional series with the same type as a last series in the current collection will be added to the end of the collection.
SwitchRowColumn()Swap the data over the axis. Data being charted on the X axis will move to the Y axis and vice versa.
WriteWorkbookStream(MemoryStream)Initializes the internally contained Excel workbook with user-specified value.

See Also