Module: Nyaplot::Diagrams::Line

Includes:
Jsonizable
Defined in:
lib/nyaplot/diagram.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Jsonizable

#before_to_json, #get_property, included, #init_properties, #set_property, #to_json

Instance Attribute Details

#colorString



241
# File 'lib/nyaplot/diagram.rb', line 241

define_group_properties(:options, [:title, :x, :y, :color, :stroke_width, :legend])

#legendBool



241
# File 'lib/nyaplot/diagram.rb', line 241

define_group_properties(:options, [:title, :x, :y, :color, :stroke_width, :legend])

#stroke_widthNumeric



241
# File 'lib/nyaplot/diagram.rb', line 241

define_group_properties(:options, [:title, :x, :y, :color, :stroke_width, :legend])

#titleString



241
# File 'lib/nyaplot/diagram.rb', line 241

define_group_properties(:options, [:title, :x, :y, :color, :stroke_width, :legend])

#xSymbol



241
# File 'lib/nyaplot/diagram.rb', line 241

define_group_properties(:options, [:title, :x, :y, :color, :stroke_width, :legend])

#ySymbol



241
# File 'lib/nyaplot/diagram.rb', line 241

define_group_properties(:options, [:title, :x, :y, :color, :stroke_width, :legend])

Instance Method Details

#process_data(df, labels) ⇒ Object



243
244
245
246
247
248
249
250
# File 'lib/nyaplot/diagram.rb', line 243

def process_data(df, labels)
  label_x = labels[0]
  label_y = labels[1]
  x(label_x)
  y(label_y)
  @xrange = [df[label_x].to_a.min, df[label_x].to_a.max]
  @yrange = [df[label_y].to_a.min, df[label_y].to_a.max]
end

#zoom?Boolean



252
253
254
# File 'lib/nyaplot/diagram.rb', line 252

def zoom?
  true
end