Class: Xlsxrb::ChartBuilder::SeriesBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/xlsxrb.rb,
sig/generated/xlsxrb.rbs

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSeriesBuilder

: () -> void



225
226
227
# File 'lib/xlsxrb.rb', line 225

def initialize
  @options = {}
end

Instance Attribute Details

#optionsObject (readonly)

: Hash[Symbol, untyped]

Returns:

  • (Object)


229
230
231
# File 'lib/xlsxrb.rb', line 229

def options
  @options
end

Instance Method Details

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

Configures the categories property for this series. : (*untyped args, **untyped kwargs) -> untyped

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



237
238
239
# File 'lib/xlsxrb.rb', line 237

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)

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



307
308
309
# File 'lib/xlsxrb.rb', line 307

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)

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



277
278
279
# File 'lib/xlsxrb.rb', line 277

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)

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



287
288
289
# File 'lib/xlsxrb.rb', line 287

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

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

Configures the marker property for this series. : (*untyped args, **untyped kwargs) -> untyped

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



267
268
269
# File 'lib/xlsxrb.rb', line 267

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

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

Configures the name property for this series. : (*untyped args, **untyped kwargs) -> untyped

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



257
258
259
# File 'lib/xlsxrb.rb', line 257

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

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



327
328
329
# File 'lib/xlsxrb.rb', line 327

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)

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



317
318
319
# File 'lib/xlsxrb.rb', line 317

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)

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



297
298
299
# File 'lib/xlsxrb.rb', line 297

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

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



337
338
339
# File 'lib/xlsxrb.rb', line 337

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

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

Configures the values property for this series. : (*untyped args, **untyped kwargs) -> untyped

Parameters:

  • args (Array)

    Positional arguments.

  • kwargs (Hash)

    Keyword arguments.

Returns:

  • (Object)

    the configured property



247
248
249
# File 'lib/xlsxrb.rb', line 247

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