Module: Nyaplot::Diagrams::Box
- 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
#color ⇒ Numeric
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
#outlier_r ⇒ Numeric
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
#stroke_color ⇒ String
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
#stroke_width ⇒ Numeric
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
#title ⇒ String
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
#value ⇒ Symbol
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
#width ⇒ Symbol
266
|
# File 'lib/nyaplot/diagram.rb', line 266
define_group_properties(:options, [:title, :value, :width, :color, :stroke_color, :stroke_width, :outlier_r])
|
Instance Method Details
#process_data(df, labels) ⇒ Object
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
# File 'lib/nyaplot/diagram.rb', line 268
def process_data(df, labels)
value(labels)
yrange = [Float::INFINITY, -Float::INFINITY]
proc = Proc.new do |column|
yrange[0] = [yrange[0], column.min].min
yrange[1] = [yrange[1], column.max].max
end
raw_data = labels.map{|label| df[label].to_a}
raw_data.each{|column| proc.call(column)}
@xrange = labels
@yrange = yrange
end
|
#zoom? ⇒ Boolean
283
284
285
|
# File 'lib/nyaplot/diagram.rb', line 283
def zoom?
false
end
|