Class: Xlsxrb::ChartBuilder::SeriesBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/xlsxrb.rb

Overview

Builder for a single series entry in block-style chart definitions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSeriesBuilder

: () -> void



191
192
193
# File 'lib/xlsxrb.rb', line 191

def initialize
  @options = {}
end

Instance Attribute Details

#optionsObject (readonly)

: Hash[Symbol, String | Integer | bool | nil]



196
197
198
# File 'lib/xlsxrb.rb', line 196

def options
  @options
end

Instance Method Details

#categories(*args, **kwargs) ⇒ Object

Configures the categories property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String | Array) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String | Array)

Returns:

  • (Object)

    the configured property



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)

Returns:

  • (Object)

    the configured property



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)

Returns:

  • (Object)

    the configured property



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)

Returns:

  • (Object)

    the configured property



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)

Returns:

  • (Object)

    the configured property



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

Returns:

  • (Object)

    the configured property



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

Returns:

  • (Object)

    the configured property



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)

Returns:

  • (Object)

    the configured property



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)

Returns:

  • (Object)

    the configured property



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

Returns:

  • (Object)

    the configured property



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

Configures the values property for this series. : (*(Hash[Symbol, String | Integer | bool | nil] | String | Array) args, **String | Integer | bool | nil kwargs) -> (Hash[Symbol, String | Integer | bool | nil] | String | Array)

Returns:

  • (Object)

    the configured property



210
211
212
# File 'lib/xlsxrb.rb', line 210

def values(*args, **kwargs)
  @options[:values] = kwargs.empty? ? args.first : kwargs
end