class Plotly::Data

Attributes

colorscale[RW]
labels[RW]
marker[RW]
mode[RW]
name[RW]
text[RW]
type[RW]
values[RW]
x[RW]
y[RW]
z[RW]

Public Class Methods

new(opts = {}) click to toggle source

@option opts [Array] x @option opts [Array] y @option opts [Array] z @option opts [Array] values @option opts [Array] labels @option opts [String] mode @option opts [String] type @option opts [String] name @option opts [Array] text array of strings @option opts [Array] colorscale @option opts [Hash or Plotly::Marker] marker

# File lib/plotly/data.rb, line 21
def initialize(opts = {})
  opts.each do |k, v|
    v.convert_to(Plotly::Marker) if k == marker
    instance_variable_set("@#{k}", v)
  end
end

Public Instance Methods

marker=(marker) click to toggle source
# File lib/plotly/data.rb, line 28
def marker=(marker)
  marker.convert_to(Plotly::Marker)
  @marker = marker
end