class Xlsxrb::ChartBuilder::SeriesBuilder
Builder for a single series entry in block-style chart definitions.
Attributes
Hash[Symbol, untyped]
@return [Hash{Symbol => Object}]
Public Class Methods
() → void
Source
# File lib/xlsxrb/chart_builder.rb, line 430 def initialize @options = {} end
Public Instance Methods
() → (Symbol | String | nil)
Source
# File lib/xlsxrb/chart_builder.rb, line 702 def axis @options[:axis] end
Gets the axis (:primary or :secondary) for this series.
@return [Symbol, String, nil] @api public
(Symbol | String | nil value) → (Symbol | String | nil)
Source
# File lib/xlsxrb/chart_builder.rb, line 712 def axis=(value) @options[:axis] = value @options[:secondary_axis] = (value.to_s == "secondary") value end
Sets the axis for this series.
@param value [Symbol, String, nil] @return [Symbol, String, nil] @api public
() → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 443 def categories @options[:categories] end
Gets categories reference for this series (e.g. “Sheet1!$A$2:$A$10”).
@return [Object] @api public
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 453 def categories=(value) @options[:categories] = value end
Sets categories reference for this series.
@param value [Object] @return [Object] @api public
(**untyped kwargs) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 621 def data_labels(**kwargs) if kwargs.empty? @options[:data_labels] else @options[:data_labels] = kwargs nil end end
Gets or configures data labels for this series.
@overload data_labels
Returns the configured data_labels property. @return [Object]
@overload data_labels(**kwargs)
Configures data_labels using keyword arguments. @return [void]
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 636 def data_labels=(value) @options[:data_labels] = value end
Sets data labels for this series.
@param value [Object] @return [Object] @api public
(**untyped kwargs) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 534 def fill(**kwargs) if kwargs.empty? @options[:fill] else @options[:fill] = kwargs nil end end
Gets or configures fill color/pattern for this series.
@overload fill
Returns the configured fill property. @return [Object]
@overload fill(**kwargs)
Configures fill using keyword arguments. @return [void]
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 549 def fill=(value) @options[:fill] = value end
Sets fill for this series.
@param value [Object] @return [Object] @api public
(**untyped kwargs) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 563 def line(**kwargs) if kwargs.empty? @options[:line] else @options[:line] = kwargs nil end end
Gets or configures line color/thickness for this series.
@overload line
Returns the configured line property. @return [Object]
@overload line(**kwargs)
Configures line using keyword arguments. @return [void]
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 578 def line=(value) @options[:line] = value end
Sets line for this series.
@param value [Object] @return [Object] @api public
(**untyped kwargs) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 505 def marker(**kwargs) if kwargs.empty? @options[:marker] else @options[:marker] = kwargs nil end end
Gets or configures data markers for this series.
@overload marker
Returns the configured marker property. @return [Object]
@overload marker(**kwargs)
Configures marker using keyword arguments. @return [void]
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 520 def marker=(value) @options[:marker] = value end
Sets marker for this series.
@param value [Object] @return [Object] @api public
() → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 481 def name @options[:name] end
Gets the name for this series (e.g. “Total Sales” or cell reference “Sheet1!$B$1”).
@return [Object] @api public
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 491 def name=(value) @options[:name] = value end
Sets name for this series.
@param value [Object] @return [Object] @api public
() → String?
Source
# File lib/xlsxrb/chart_builder.rb, line 664 def shape @options[:shape] end
Gets 3D bar/column shape (e.g. “cylinder”, “cone”, “pyramid”).
@return [String, nil] @api public
(String? value) → String?
Source
# File lib/xlsxrb/chart_builder.rb, line 674 def shape=(value) @options[:shape] = value end
Sets 3D bar/column shape for this series.
@param value [String, nil] @return [String, nil] @api public
(bool? value) → bool?
Source
# File lib/xlsxrb/chart_builder.rb, line 655 def smooth=(value) @options[:smooth] = value end
Sets line smoothing for this series.
@param value [Boolean, nil] @return [Boolean, nil] @api public
() → bool
Source
# File lib/xlsxrb/chart_builder.rb, line 645 def smooth? @options[:smooth] ? true : false end
Returns line smoothing for this series.
@return [Boolean] @api public
(**untyped kwargs) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 592 def trendline(**kwargs) if kwargs.empty? @options[:trendline] else @options[:trendline] = kwargs nil end end
Gets or configures trendline for this series.
@overload trendline
Returns the configured trendline property. @return [Object]
@overload trendline(**kwargs)
Configures trendline using keyword arguments. @return [void]
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 607 def trendline=(value) @options[:trendline] = value end
Sets trendline for this series.
@param value [Object] @return [Object] @api public
() → (Symbol | String | nil)
Source
# File lib/xlsxrb/chart_builder.rb, line 683 def type @options[:type] end
Gets individual series chart type override in combo charts.
@return [Symbol, String, nil] @api public
(Symbol | String | nil value) → (Symbol | String | nil)
Source
# File lib/xlsxrb/chart_builder.rb, line 693 def type=(value) @options[:type] = value end
Sets individual series chart type override.
@param value [Symbol, String, nil] @return [Symbol, String, nil] @api public
() → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 462 def values @options[:values] end
Gets values reference for this series (e.g. “Sheet1!$B$2:$B$10”).
@return [Object] @api public
(untyped value) → untyped
Source
# File lib/xlsxrb/chart_builder.rb, line 472 def values=(value) @options[:values] = value end
Sets values reference for this series.
@param value [Object] @return [Object] @api public