Class OdfChartSeries
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
Index
Gets the zero-based index of this series within the chart. 取得此序列在圖表中的索引(從 0 起算)。
public int Index { get; }
Property Value
LabelCellAddress
Gets or sets the label cell address. 取得或設定標籤儲存格位址。
public string? LabelCellAddress { get; set; }
Property Value
SeriesClass
Gets or sets the series class (e.g. chart:line, chart:bar).
取得或設定序列類型(例如 chart:line、chart:bar)。
public string? SeriesClass { get; set; }
Property Value
Style
Gets or sets the chart automatic style of this data series. 取得或設定此資料序列的圖表自動樣式。
public OdfChartStyle Style { get; set; }
Property Value
StyleName
Gets or sets the series style name. 取得或設定序列樣式名稱。
public string? StyleName { get; set; }
Property Value
ValuesCellRangeAddress
Gets or sets the data value cell range address. 取得或設定資料值儲存格範圍位址。
public string ValuesCellRangeAddress { get; set; }
Property Value
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
repeatedint
AddDataPoint(int, string?)
Adds a data point style override entry (chart:data-point).
新增一筆資料點樣式覆蓋設定(chart:data-point)。
public void AddDataPoint(int repeated, string? styleName)
Parameters
repeatedintThe number of consecutive data points this entry applies to; defaults to 1. / 此筆設定套用的連續資料點數量,預設為 1。
styleNamestringThe applied style name; no style is written when null. / 套用的樣式名稱;為 null 時不寫入樣式。
Exceptions
- ArgumentOutOfRangeException
Thrown when
repeatedis less than 1. / 當repeated小於 1 時擲出。
ApplyMarkerStyle(OdfChartMarkerStyle)
Applies practical marker styling to this series. 將實務標記樣式套用至此序列。
public void ApplyMarkerStyle(OdfChartMarkerStyle style)
Parameters
styleOdfChartMarkerStyleThe 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-labelexists 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-indicatorexists 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-curveexists 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
presetOdfChartDataLabelPresetThe 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
infoOdfChartDataLabelInfoThe 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
infoOdfChartErrorIndicatorInfoThe 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
infoOdfChartMeanValueInfoThe 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
infoOdfChartRegressionCurveInfoThe trend line setting; pass null to remove the existing setting. / 趨勢線設定;傳入 null 表示移除既有設定。