Class
WorkbookFormulaChartData

Formula-based chart data that resolves to cell ranges within a workbook for dynamic chart series and values.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Charts

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class WorkbookFormulaChartData : FormulaChartData, IChartData

Inheritance: objectFormulaChartDataWorkbookFormulaChartData

Implements: IChartData

Inherited Members FormulaChartData.ChartDataTypeFormulaChartData.Formula

Constructors

WorkbookFormulaChartData(Workbook, string)

Initializes a new WorkbookFormulaChartData with a formula string that references chart data in the workbook.

Declaration

cs-api-definition
public WorkbookFormulaChartData(Workbook workbook, string formula)

Parameters

workbook

Workbook

The workbook the formula refer to.

formula

string

The formula which refers to the chart data.

WorkbookFormulaChartData(Worksheet, params CellRange[])

Initializes a new WorkbookFormulaChartData from cell ranges in the specified worksheet.

Declaration

cs-api-definition
public WorkbookFormulaChartData(Worksheet worksheet, params CellRange[] ranges)

Parameters

worksheet

Worksheet

The worksheet the ranges refer to.

ranges

CellRange[]

The ranges that refer to the chart data.

Properties

Workbook

The workbook containing the cell ranges referenced by this chart data formula.

Declaration

cs-api-definition
public Workbook Workbook { get; }

Property Value

Workbook

Methods

Clone()

Creates a deep copy of this chart data instance with the same formula and workbook reference.

Declaration

cs-api-definition
public override IChartData Clone()

Returns

IChartData

The deep copy of the object.

Overrides FormulaChartData.Clone()

EnumerateCellRanges(out Worksheet)

Resolves the formula to cell ranges and returns them along with the containing worksheet.

Declaration

cs-api-definition
public IEnumerable<CellRange> EnumerateCellRanges(out Worksheet worksheet)

Parameters

worksheet

Worksheet

Returns

IEnumerable<CellRange>

The result cell ranges.

Exceptions

FormatException

Thrown when the formula referring to the data cannot be parsed to cell ranges.

TryEnumerateCellRanges(out IEnumerable<CellRange>, out Worksheet)

Attempts to resolve the formula to cell ranges and returns whether the resolution succeeded.

Declaration

cs-api-definition
public bool TryEnumerateCellRanges(out IEnumerable<CellRange> resultCellRanges, out Worksheet worksheet)

Parameters

resultCellRanges

IEnumerable<CellRange>

The result cell ranges.

worksheet

Worksheet

The worksheet the cell ranges are located in.

Returns

bool

A value indicating whether the ranges have been retrieved.