Module: Nyaplot::Diagrams::Histogram

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

#colorArray<String>



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

define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width])

#stroke_colorString



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

define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width])

#stroke_widthNumeric



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

define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width])

#valueSymbol



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

define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width])

#widthSymbol



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

define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width])

Instance Method Details

#process_data(df, labels) ⇒ Object



93
94
95
96
97
98
# File 'lib/nyaplot/diagram.rb', line 93

def process_data(df, labels)
  label = labels[0]
  value(label)
  @xrange = [(df[label].to_a.min < 0 ? df[label].to_a.min : 0), df[label].to_a.max]
  @yrange = [0, df[label].to_a.length]
end

#zoom?Boolean



100
101
102
# File 'lib/nyaplot/diagram.rb', line 100

def zoom?
  false
end