Table of Contents

Class OdfChartSeries

Namespace
OdfKit.Chart
Assembly
OdfKit.dll

Represents an editable chart data series. 表示可編輯的圖表資料序列。

public sealed class OdfChartSeries
Inheritance
OdfChartSeries
Inherited Members

Properties

AttachedAxis

Gets or sets the name of the attached axis (e.g. primary-y). 取得或設定附著的座標軸名稱(例如 primary-y)。

public string? AttachedAxis { get; set; }

Property Value

string

Index

Gets the zero-based index of this series within the chart. 取得此序列在圖表中的索引(從 0 起算)。

public int Index { get; }

Property Value

int

LabelCellAddress

Gets or sets the label cell address. 取得或設定標籤儲存格位址。

public string? LabelCellAddress { get; set; }

Property Value

string

SeriesClass

Gets or sets the series class (e.g. chart:line, chart:bar). 取得或設定序列類型(例如 chart:linechart:bar)。

public string? SeriesClass { get; set; }

Property Value

string

Style

Gets or sets the chart automatic style of this data series. 取得或設定此資料序列的圖表自動樣式。

public OdfChartStyle Style { get; set; }

Property Value

OdfChartStyle

StyleName

Gets or sets the series style name. 取得或設定序列樣式名稱。

public string? StyleName { get; set; }

Property Value

string

ValuesCellRangeAddress

Gets or sets the data value cell range address. 取得或設定資料值儲存格範圍位址。

public string ValuesCellRangeAddress { get; set; }

Property Value

string

Methods

AddDataPoint()

Short overload of AddDataPoint that uses default values for all optional parameters and forwards to the full overload. 便利多載:AddDataPoint 的所有可選參數使用預設值並轉呼叫最長多載。

public void AddDataPoint()

AddDataPoint(int)

Short overload of AddDataPoint that accepts repeated; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 repeated;其餘可選參數使用預設值並轉呼叫最長 AddDataPoint 多載。

public void AddDataPoint(int repeated)

Parameters

repeated int

AddDataPoint(int, string?)

Adds a data point style override entry (chart:data-point). 新增一筆資料點樣式覆蓋設定(chart:data-point)。

public void AddDataPoint(int repeated, string? styleName)

Parameters

repeated int

The number of consecutive data points this entry applies to; defaults to 1. / 此筆設定套用的連續資料點數量,預設為 1。

styleName string

The applied style name; no style is written when null. / 套用的樣式名稱;為 null 時不寫入樣式。

Exceptions

ArgumentOutOfRangeException

Thrown when repeated is less than 1. / 當 repeated 小於 1 時擲出。

ApplyMarkerStyle(OdfChartMarkerStyle)

Applies practical marker styling to this series. 將實務標記樣式套用至此序列。

public void ApplyMarkerStyle(OdfChartMarkerStyle style)

Parameters

style OdfChartMarkerStyle

The marker style. / 標記樣式。

ClearDataPoints()

Removes all data point style override entries from this series. 移除此序列中所有資料點樣式覆蓋設定。

public void ClearDataPoints()

FindDataLabels()

Finds the data label setting (chart:data-label) for this series; null if not set. 尋找此序列的資料標籤設定(chart:data-label);若未設定則為 null

public OdfChartDataLabelInfo? FindDataLabels()

Returns

OdfChartDataLabelInfo

The data label setting; null if no chart:data-label exists in this series. / 資料標籤設定;若序列中第一個 chart:data-label 不存在則為 null

FindErrorIndicator()

Finds the error bar setting (chart:error-indicator) for this series; null if not set. 尋找此序列的誤差棒設定(chart:error-indicator);若未設定則為 null

public OdfChartErrorIndicatorInfo? FindErrorIndicator()

Returns

OdfChartErrorIndicatorInfo

The error bar setting; null if no chart:error-indicator exists in this series. / 誤差棒設定;若序列中第一個 chart:error-indicator 不存在則為 null

FindMeanValue()

Finds the mean value line setting (chart:mean-value) for this series; null if not set. 尋找此序列的平均值線設定(chart:mean-value);若未設定則為 null

public OdfChartMeanValueInfo? FindMeanValue()

Returns

OdfChartMeanValueInfo

The mean value line setting; null if this series does not define chart:mean-value. / 平均值線設定;若序列未定義 chart:mean-value 則為 null

FindRegressionCurve()

Finds the trend line (regression curve) setting (chart:regression-curve) for this series; null if not set. 尋找此序列的趨勢線(迴歸曲線)設定(chart:regression-curve);若未設定則為 null

public OdfChartRegressionCurveInfo? FindRegressionCurve()

Returns

OdfChartRegressionCurveInfo

The trend line setting; null if no chart:regression-curve exists in this series. / 趨勢線設定;若序列中第一個 chart:regression-curve 不存在則為 null

GetDataPoints()

Gets all data point style override entries (chart:data-point) in this series. 取得此序列中所有資料點樣式覆蓋設定(chart:data-point)。

public IReadOnlyList<OdfChartDataPointInfo> GetDataPoints()

Returns

IReadOnlyList<OdfChartDataPointInfo>

The list of data point style override entries, in document order. / 資料點樣式覆蓋設定清單,依文件中出現順序排列。

GetMarkerStyle()

Gets practical marker styling from this series style. 取得此序列樣式中的實務標記樣式。

public OdfChartMarkerStyle? GetMarkerStyle()

Returns

OdfChartMarkerStyle

The marker style, or null when no marker style is set. / 標記樣式;未設定時為 null

SetDataLabelPreset(OdfChartDataLabelPreset)

Sets or removes the data label for this series according to a common preset combination. 依常用預設組合設定或移除此序列的資料標籤。

public void SetDataLabelPreset(OdfChartDataLabelPreset preset)

Parameters

preset OdfChartDataLabelPreset

The data label preset combination; None removes the existing setting. / 資料標籤預設組合;None 表示移除既有設定。

SetDataLabels(OdfChartDataLabelInfo?)

Sets or removes the data label for this series. 設定或移除此序列的資料標籤。

public void SetDataLabels(OdfChartDataLabelInfo? info)

Parameters

info OdfChartDataLabelInfo

The data label setting; pass null to remove the existing setting. / 資料標籤設定;傳入 null 表示移除既有設定。

SetErrorIndicator(OdfChartErrorIndicatorInfo?)

Sets or removes the error bar for this series. 設定或移除此序列的誤差棒。

public void SetErrorIndicator(OdfChartErrorIndicatorInfo? info)

Parameters

info OdfChartErrorIndicatorInfo

The error bar setting; pass null to remove the existing setting. / 誤差棒設定;傳入 null 表示移除既有設定。

SetMeanValue(OdfChartMeanValueInfo?)

Sets or removes the mean value line for this series. 設定或移除此序列的平均值線。

public void SetMeanValue(OdfChartMeanValueInfo? info)

Parameters

info OdfChartMeanValueInfo

The mean value line setting; pass null to remove the existing setting. / 平均值線設定;傳入 null 表示移除既有設定。

SetRegressionCurve(OdfChartRegressionCurveInfo?)

Sets or removes the trend line (regression curve) for this series. 設定或移除此序列的趨勢線(迴歸曲線)。

public void SetRegressionCurve(OdfChartRegressionCurveInfo? info)

Parameters

info OdfChartRegressionCurveInfo

The trend line setting; pass null to remove the existing setting. / 趨勢線設定;傳入 null 表示移除既有設定。