Class: Plotly::Line

Inherits:
Object show all
Includes:
Castable
Defined in:
lib/plotly/line.rb

Constant Summary collapse

ATTRS =
%i(width color).freeze

Instance Method Summary collapse

Methods included from Castable

#to_h

Constructor Details

#initialize(opts) ⇒ Line

Returns a new instance of Line.

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • width (Fixnum)
  • color (String)

    ‘rgba(0, 0, 200, .5)’



12
13
14
15
# File 'lib/plotly/line.rb', line 12

def initialize(opts)
  return unless opts.is_a?(Hash)
  opts.each { |k, v| instance_variable_set("@#{k}", v) }
end