Class: Plotly::Axis

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

Constant Summary collapse

ATTRS =
i(title range zeroline).freeze

Instance Method Summary collapse

Methods included from Castable

#to_h

Constructor Details

#initialize(opts) ⇒ Axis

Returns a new instance of Axis.

Options Hash (opts):

  • title (String)
  • range (Array)
  • zeroline (Boolean)


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

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