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
#color ⇒ Array<String>
95
|
# File 'lib/nyaplot/diagram.rb', line 95
define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width, :legend])
|
#legend ⇒ Bool
95
|
# File 'lib/nyaplot/diagram.rb', line 95
define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width, :legend])
|
#stroke_color ⇒ String
95
|
# File 'lib/nyaplot/diagram.rb', line 95
define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width, :legend])
|
#stroke_width ⇒ Numeric
95
|
# File 'lib/nyaplot/diagram.rb', line 95
define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width, :legend])
|
#value ⇒ Symbol
95
|
# File 'lib/nyaplot/diagram.rb', line 95
define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width, :legend])
|
#width ⇒ Symbol
95
|
# File 'lib/nyaplot/diagram.rb', line 95
define_group_properties(:options, [:title, :value, :bin_num, :width, :color, :stroke_color, :stroke_width, :legend])
|
Instance Method Details
#process_data(df, labels) ⇒ Object
97
98
99
100
101
102
|
# File 'lib/nyaplot/diagram.rb', line 97
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
104
105
106
|
# File 'lib/nyaplot/diagram.rb', line 104
def zoom?
false
end
|