Class ChartDocumentBuilder
Provides a fluent construction flow for high-level chart documents. 提供高階圖表文件的 Fluent 建構流程。
public sealed class ChartDocumentBuilder
- Inheritance
-
ChartDocumentBuilder
- Inherited Members
Methods
Build()
Completes construction and returns the chart document. 完成建構並回傳圖表文件。
public ChartDocument Build()
Returns
- ChartDocument
The constructed ChartDocument. / 建構完成的 ChartDocument。
ConfigureSeries(int, Action<ChartSeriesBuilder>)
Configures the specified data series. 設定指定資料序列。
public ChartDocumentBuilder ConfigureSeries(int index, Action<ChartSeriesBuilder> configure)
Parameters
indexintThe zero-based series index. / 序列索引(從 0 起算)。
configureAction<ChartSeriesBuilder>The series configuration delegate. / 序列配置委派。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
With3D(Action<OdfChart3DOptions>)
Applies practical 3D chart options. 套用實務 3D 圖表選項。
public ChartDocumentBuilder With3D(Action<OdfChart3DOptions> configure)
Parameters
configureAction<OdfChart3DOptions>The 3D options configuration delegate. / 3D 選項設定委派。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithAxis(string, Action<ChartAxisBuilder>)
Configures the axis for the specified dimension. 設定指定維度座標軸。
public ChartDocumentBuilder WithAxis(string dimension, Action<ChartAxisBuilder> configure)
Parameters
dimensionstringThe axis dimension, e.g. x, y, z. / 座標軸維度,例如 x、y、z。
configureAction<ChartAxisBuilder>The axis configuration delegate. / 座標軸配置委派。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithBubbleSeries(params OdfBubbleChartSeriesRequest[])
Replaces the chart data with bubble chart series. 以泡泡圖序列取代圖表資料。
public ChartDocumentBuilder WithBubbleSeries(params OdfBubbleChartSeriesRequest[] series)
Parameters
seriesOdfBubbleChartSeriesRequest[]The bubble chart series requests. / 泡泡圖序列要求。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithDataRange(string, OdfCellRange)
Short overload of WithDataRange that accepts sheetName and range; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 sheetName 與 range;其餘可選參數使用預設值並轉呼叫最長 WithDataRange 多載。
public ChartDocumentBuilder WithDataRange(string sheetName, OdfCellRange range)
Parameters
sheetNamestringrangeOdfCellRange
Returns
WithDataRange(string, OdfCellRange, bool)
Short overload of WithDataRange that accepts sheetName, range, and firstRowAsHeader; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 sheetName、range 與 firstRowAsHeader;其餘可選參數使用預設值並轉呼叫最長 WithDataRange 多載。
public ChartDocumentBuilder WithDataRange(string sheetName, OdfCellRange range, bool firstRowAsHeader)
Parameters
sheetNamestringrangeOdfCellRangefirstRowAsHeaderbool
Returns
WithDataRange(string, OdfCellRange, bool, bool)
Sets the chart data range. 設定圖表資料範圍。
public ChartDocumentBuilder WithDataRange(string sheetName, OdfCellRange range, bool firstRowAsHeader, bool firstColumnAsLabel)
Parameters
sheetNamestringThe sheet name. / 工作表名稱。
rangeOdfCellRangeThe cell range. / 儲存格範圍。
firstRowAsHeaderboolWhether the first row is treated as a header row. / 首列是否視為標題列。
firstColumnAsLabelboolWhether the first column is treated as a category label. / 首欄是否視為分類標籤。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithLegend()
Short overload of WithLegend that uses default values for all optional parameters and forwards to the full overload. 便利多載:WithLegend 的所有可選參數使用預設值並轉呼叫最長多載。
public ChartDocumentBuilder WithLegend()
Returns
WithLegend(string?)
Short overload of WithLegend that accepts position; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 position;其餘可選參數使用預設值並轉呼叫最長 WithLegend 多載。
public ChartDocumentBuilder WithLegend(string? position)
Parameters
positionstring
Returns
WithLegend(string?, string?)
Sets the legend layout. 設定圖例配置。
public ChartDocumentBuilder WithLegend(string? position, string? alignment)
Parameters
positionstringThe legend position; blank hides the legend. / 圖例位置;空白表示隱藏圖例。
alignmentstringThe legend alignment. / 圖例對齊方式。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithPreset(OdfChartPreset)
Sets the chart type and practical defaults from a preset. 依圖表預設設定圖表類型與實務預設值。
public ChartDocumentBuilder WithPreset(OdfChartPreset preset)
Parameters
presetOdfChartPresetThe chart preset. / 圖表預設。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithStockMarkers(OdfStockMarkerStyle)
Applies practical stock marker styles. 套用實務股票圖標記樣式。
public ChartDocumentBuilder WithStockMarkers(OdfStockMarkerStyle style)
Parameters
styleOdfStockMarkerStyleThe stock marker style. / 股票圖標記樣式。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithStockSeries(params OdfStockChartSeriesRequest[])
Replaces the chart data with stock chart series. 以股票圖序列取代圖表資料。
public ChartDocumentBuilder WithStockSeries(params OdfStockChartSeriesRequest[] series)
Parameters
seriesOdfStockChartSeriesRequest[]The stock chart series requests. / 股票圖序列要求。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithStyles(OdfStyleSet)
Sets the style set this builder applies to subsequently created chart series. 設定此 builder 後續建立圖表序列會套用的樣式集合。
public ChartDocumentBuilder WithStyles(OdfStyleSet styles)
Parameters
stylesOdfStyleSetThe style set. / 樣式集合。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithStyles(Action<OdfStyleSet>)
Sets the style set this builder applies to subsequently created chart series. 設定此 builder 後續建立圖表序列會套用的樣式集合。
public ChartDocumentBuilder WithStyles(Action<OdfStyleSet> configure)
Parameters
configureAction<OdfStyleSet>The style set configuration delegate. / 樣式集合設定委派。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithTitle(string?)
Sets the chart title. 設定圖表標題。
public ChartDocumentBuilder WithTitle(string? title)
Parameters
titlestringThe chart title. / 圖表標題。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。
WithType(OdfChartType)
Sets the chart type. 設定圖表類型。
public ChartDocumentBuilder WithType(OdfChartType chartType)
Parameters
chartTypeOdfChartTypeThe chart type. / 圖表類型。
Returns
- ChartDocumentBuilder
The current builder. / 目前 builder。