Class: Xlsxrb::ChartBuilder::SeriesBuilder
- Inherits:
-
Object
- Object
- Xlsxrb::ChartBuilder::SeriesBuilder
- Defined in:
- lib/xlsxrb/chart_builder.rb,
sig/generated/xlsxrb/chart_builder.rbs
Overview
Builder for a single series entry in block-style chart definitions.
Instance Attribute Summary collapse
-
#options ⇒ Hash{Symbol => Object}
readonly
: Hash[Symbol, untyped].
Instance Method Summary collapse
-
#categories(*args, **kwargs) ⇒ Object
Configures categories reference for this series (e.g. "Sheet1!$A$2:$A$10").
-
#data_labels(*args, **kwargs) ⇒ Object
Configures data labels for this series.
-
#fill(*args, **kwargs) ⇒ Object
Configures fill color/pattern for this series.
-
#initialize ⇒ SeriesBuilder
constructor
: () -> void.
-
#line(*args, **kwargs) ⇒ Object
Configures line color/thickness for this series.
-
#marker(*args, **kwargs) ⇒ Object
Configures data markers for this series.
-
#name(*args, **kwargs) ⇒ Object
Configures the name for this series (e.g. "Total Sales" or cell reference "Sheet1!$B$1").
-
#shape(*args, **kwargs) ⇒ String
Configures 3D bar/column shape (e.g. "cylinder", "cone", "pyramid").
-
#smooth(*args, **kwargs) ⇒ Boolean, String
Configures line smoothing for this series.
-
#trendline(*args, **kwargs) ⇒ Object
Configures trendline for this series.
-
#type(*args, **kwargs) ⇒ String
Configures individual series chart type override in combo charts.
-
#values(*args, **kwargs) ⇒ Object
Configures values reference for this series (e.g. "Sheet1!$B$2:$B$10").
Constructor Details
#initialize ⇒ SeriesBuilder
: () -> void
203 204 205 |
# File 'lib/xlsxrb/chart_builder.rb', line 203 def initialize @options = {} end |
Instance Attribute Details
#options ⇒ Hash{Symbol => Object} (readonly)
: Hash[Symbol, untyped]
209 210 211 |
# File 'lib/xlsxrb/chart_builder.rb', line 209 def @options end |
Instance Method Details
#categories(*args, **kwargs) ⇒ Object
Configures categories reference for this series (e.g. "Sheet1!$A$2:$A$10").
: (*untyped args, **untyped kwargs) -> untyped
218 219 220 |
# File 'lib/xlsxrb/chart_builder.rb', line 218 def categories(*args, **kwargs) @options[:categories] = kwargs.empty? ? args.first : kwargs end |
#data_labels(*args, **kwargs) ⇒ Object
Configures data labels for this series.
: (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
295 296 297 |
# File 'lib/xlsxrb/chart_builder.rb', line 295 def data_labels(*args, **kwargs) @options[:data_labels] = kwargs.empty? ? args.first : kwargs end |
#fill(*args, **kwargs) ⇒ Object
Configures fill color/pattern for this series.
: (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
262 263 264 |
# File 'lib/xlsxrb/chart_builder.rb', line 262 def fill(*args, **kwargs) @options[:fill] = kwargs.empty? ? args.first : kwargs end |
#line(*args, **kwargs) ⇒ Object
Configures line color/thickness for this series.
: (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
273 274 275 |
# File 'lib/xlsxrb/chart_builder.rb', line 273 def line(*args, **kwargs) @options[:line] = kwargs.empty? ? args.first : kwargs end |
#marker(*args, **kwargs) ⇒ Object
Configures data markers for this series.
: (*untyped args, **untyped kwargs) -> untyped
251 252 253 |
# File 'lib/xlsxrb/chart_builder.rb', line 251 def marker(*args, **kwargs) @options[:marker] = kwargs.empty? ? args.first : kwargs end |
#name(*args, **kwargs) ⇒ Object
Configures the name for this series (e.g. "Total Sales" or cell reference "Sheet1!$B$1").
: (*untyped args, **untyped kwargs) -> untyped
240 241 242 |
# File 'lib/xlsxrb/chart_builder.rb', line 240 def name(*args, **kwargs) @options[:name] = kwargs.empty? ? args.first : kwargs end |
#shape(*args, **kwargs) ⇒ String
Configures 3D bar/column shape (e.g. "cylinder", "cone", "pyramid").
: (*(String) args, **String | Integer | bool | nil kwargs) -> String
317 318 319 |
# File 'lib/xlsxrb/chart_builder.rb', line 317 def shape(*args, **kwargs) @options[:shape] = kwargs.empty? ? args.first : kwargs end |
#smooth(*args, **kwargs) ⇒ Boolean, String
Configures line smoothing for this series.
: (*(bool | String) args, **String | Integer | bool | nil kwargs) -> (bool | String)
306 307 308 |
# File 'lib/xlsxrb/chart_builder.rb', line 306 def smooth(*args, **kwargs) @options[:smooth] = kwargs.empty? ? args.first : kwargs end |
#trendline(*args, **kwargs) ⇒ Object
Configures trendline for this series.
: (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
284 285 286 |
# File 'lib/xlsxrb/chart_builder.rb', line 284 def trendline(*args, **kwargs) @options[:trendline] = kwargs.empty? ? args.first : kwargs end |
#type(*args, **kwargs) ⇒ String
Configures individual series chart type override in combo charts.
: (*(String) args, **String | Integer | bool | nil kwargs) -> String
328 329 330 |
# File 'lib/xlsxrb/chart_builder.rb', line 328 def type(*args, **kwargs) @options[:type] = kwargs.empty? ? args.first : kwargs end |
#values(*args, **kwargs) ⇒ Object
Configures values reference for this series (e.g. "Sheet1!$B$2:$B$10").
: (*untyped args, **untyped kwargs) -> untyped
229 230 231 |
# File 'lib/xlsxrb/chart_builder.rb', line 229 def values(*args, **kwargs) @options[:values] = kwargs.empty? ? args.first : kwargs end |