Class: Charty::Plotters::RelationalPlotter

Inherits:
AbstractPlotter show all
Defined in:
lib/charty/plotters/relational_plotter.rb

Direct Known Subclasses

LinePlotter, ScatterPlotter

Instance Attribute Summary collapse

Attributes inherited from AbstractPlotter

#color, #color_order, #data, #key_color, #palette, #title, #x, #x_label, #y, #y_label

Instance Method Summary collapse

Methods inherited from AbstractPlotter

#inspect, #processed_data, #render, #save, #to_iruby, #to_iruby_mimebundle, #var_levels

Constructor Details

#initialize(x, y, color, style, size, data: nil, **options, &block) ⇒ RelationalPlotter

Returns a new instance of RelationalPlotter.


431
432
433
434
435
436
437
438
# File 'lib/charty/plotters/relational_plotter.rb', line 431

def initialize(x, y, color, style, size, data: nil, **options, &block)
  super(x, y, color, data: data, **options, &block)

  self.style = style
  self.size = size

  setup_variables
end

Instance Attribute Details

#color_normObject

Returns the value of attribute color_norm.


442
443
444
# File 'lib/charty/plotters/relational_plotter.rb', line 442

def color_norm
  @color_norm
end

#dashesObject

Returns the value of attribute dashes.


446
447
448
# File 'lib/charty/plotters/relational_plotter.rb', line 446

def dashes
  @dashes
end

#input_formatObject (readonly)

Returns the value of attribute input_format.


525
526
527
# File 'lib/charty/plotters/relational_plotter.rb', line 525

def input_format
  @input_format
end

#legendObject

Returns the value of attribute legend.


448
449
450
# File 'lib/charty/plotters/relational_plotter.rb', line 448

def legend
  @legend
end

#markersObject

Returns the value of attribute markers.


446
447
448
# File 'lib/charty/plotters/relational_plotter.rb', line 446

def markers
  @markers
end

#plot_dataObject (readonly)

Returns the value of attribute plot_data.


525
526
527
# File 'lib/charty/plotters/relational_plotter.rb', line 525

def plot_data
  @plot_data
end

#sizeObject

Returns the value of attribute size.


440
441
442
# File 'lib/charty/plotters/relational_plotter.rb', line 440

def size
  @size
end

#size_normObject

Returns the value of attribute size_norm.


444
445
446
# File 'lib/charty/plotters/relational_plotter.rb', line 444

def size_norm
  @size_norm
end

#size_orderObject

Returns the value of attribute size_order.


444
445
446
# File 'lib/charty/plotters/relational_plotter.rb', line 444

def size_order
  @size_order
end

#sizesObject

Returns the value of attribute sizes.


444
445
446
# File 'lib/charty/plotters/relational_plotter.rb', line 444

def sizes
  @sizes
end

#styleObject

Returns the value of attribute style.


440
441
442
# File 'lib/charty/plotters/relational_plotter.rb', line 440

def style
  @style
end

#style_orderObject

Returns the value of attribute style_order.


446
447
448
# File 'lib/charty/plotters/relational_plotter.rb', line 446

def style_order
  @style_order
end

#unitsObject

Returns the value of attribute units.


440
441
442
# File 'lib/charty/plotters/relational_plotter.rb', line 440

def units
  @units
end

#var_typesObject (readonly)

Returns the value of attribute var_types.


525
526
527
# File 'lib/charty/plotters/relational_plotter.rb', line 525

def var_types
  @var_types
end

#variablesObject (readonly)

Returns the value of attribute variables.


525
526
527
# File 'lib/charty/plotters/relational_plotter.rb', line 525

def variables
  @variables
end

Instance Method Details

#flat_structureObject


424
425
426
427
428
429
# File 'lib/charty/plotters/relational_plotter.rb', line 424

def flat_structure
  {
    x: :index,
    y: :values
  }
end