Class: Xlsxrb::ChartBuilder::SeriesBuilder
- Inherits:
-
Object
- Object
- Xlsxrb::ChartBuilder::SeriesBuilder
- Defined in:
- lib/xlsxrb.rb
Overview
Builder for a single series entry in block-style chart definitions.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
: Hash[Symbol, String | Integer | bool | nil].
Instance Method Summary collapse
-
#categories(*args, **kwargs) ⇒ Object
Configures the categories property for this series.
-
#data_labels(*args, **kwargs) ⇒ Object
Configures the data_labels property for this series.
-
#fill(*args, **kwargs) ⇒ Object
Configures the fill property for this series.
-
#initialize ⇒ SeriesBuilder
constructor
: () -> void.
-
#line(*args, **kwargs) ⇒ Object
Configures the line property for this series.
-
#marker(*args, **kwargs) ⇒ Object
Configures the marker property for this series.
-
#name(*args, **kwargs) ⇒ Object
Configures the name property for this series.
-
#shape(*args, **kwargs) ⇒ Object
Configures the shape property for this series.
-
#smooth(*args, **kwargs) ⇒ Object
Configures the smooth property for this series.
-
#trendline(*args, **kwargs) ⇒ Object
Configures the trendline property for this series.
-
#type(*args, **kwargs) ⇒ Object
Configures the type property for this series.
-
#values(*args, **kwargs) ⇒ Object
Configures the values property for this series.
Constructor Details
#initialize ⇒ SeriesBuilder
: () -> void
191 192 193 |
# File 'lib/xlsxrb.rb', line 191 def initialize @options = {} end |
Instance Attribute Details
#options ⇒ Object (readonly)
: Hash[Symbol, String | Integer | bool | nil]
196 197 198 |
# File 'lib/xlsxrb.rb', line 196 def @options end |
Instance Method Details
#categories(*args, **kwargs) ⇒ Object
202 203 204 |
# File 'lib/xlsxrb.rb', line 202 def categories(*args, **kwargs) @options[:categories] = kwargs.empty? ? args.first : kwargs end |
#data_labels(*args, **kwargs) ⇒ Object
Configures the data_labels property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
258 259 260 |
# File 'lib/xlsxrb.rb', line 258 def data_labels(*args, **kwargs) @options[:data_labels] = kwargs.empty? ? args.first : kwargs end |
#fill(*args, **kwargs) ⇒ Object
Configures the fill property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
234 235 236 |
# File 'lib/xlsxrb.rb', line 234 def fill(*args, **kwargs) @options[:fill] = kwargs.empty? ? args.first : kwargs end |
#line(*args, **kwargs) ⇒ Object
Configures the line property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
242 243 244 |
# File 'lib/xlsxrb.rb', line 242 def line(*args, **kwargs) @options[:line] = kwargs.empty? ? args.first : kwargs end |
#marker(*args, **kwargs) ⇒ Object
Configures the marker property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
226 227 228 |
# File 'lib/xlsxrb.rb', line 226 def marker(*args, **kwargs) @options[:marker] = kwargs.empty? ? args.first : kwargs end |
#name(*args, **kwargs) ⇒ Object
Configures the name property for this series. : (*(String) args, **String | Integer | bool | nil kwargs) -> String
218 219 220 |
# File 'lib/xlsxrb.rb', line 218 def name(*args, **kwargs) @options[:name] = kwargs.empty? ? args.first : kwargs end |
#shape(*args, **kwargs) ⇒ Object
Configures the shape property for this series. : (*(String) args, **String | Integer | bool | nil kwargs) -> String
274 275 276 |
# File 'lib/xlsxrb.rb', line 274 def shape(*args, **kwargs) @options[:shape] = kwargs.empty? ? args.first : kwargs end |
#smooth(*args, **kwargs) ⇒ Object
Configures the smooth property for this series. : (*(bool | String) args, **String | Integer | bool | nil kwargs) -> (bool | String)
266 267 268 |
# File 'lib/xlsxrb.rb', line 266 def smooth(*args, **kwargs) @options[:smooth] = kwargs.empty? ? args.first : kwargs end |
#trendline(*args, **kwargs) ⇒ Object
Configures the trendline property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String)
250 251 252 |
# File 'lib/xlsxrb.rb', line 250 def trendline(*args, **kwargs) @options[:trendline] = kwargs.empty? ? args.first : kwargs end |
#type(*args, **kwargs) ⇒ Object
Configures the type property for this series. : (*(String) args, **String | Integer | bool | nil kwargs) -> String
282 283 284 |
# File 'lib/xlsxrb.rb', line 282 def type(*args, **kwargs) @options[:type] = kwargs.empty? ? args.first : kwargs end |
#values(*args, **kwargs) ⇒ Object
210 211 212 |
# File 'lib/xlsxrb.rb', line 210 def values(*args, **kwargs) @options[:values] = kwargs.empty? ? args.first : kwargs end |