Class: Drawr::Pie
Instance Attribute Summary
Attributes inherited from Base
#div, #hide_dots, #labels, #theme, #title
Instance Method Summary collapse
- #data(name, data_points = [], color = nil) ⇒ Object
-
#initialize(target_width = 800) ⇒ Pie
constructor
A new instance of Pie.
Methods inherited from Base
Constructor Details
#initialize(target_width = 800) ⇒ Pie
Returns a new instance of Pie.
80 81 82 83 |
# File 'lib/drawr.rb', line 80 def initialize(target_width = 800) super(target_width) @extra_options[:strokewidth] = 1 end |
Instance Method Details
#data(name, data_points = [], color = nil) ⇒ Object
85 86 87 88 89 |
# File 'lib/drawr.rb', line 85 def data(name, data_points = [], color = nil) @labels ||= {} @labels[@labels.length] = name super(name, data_points, color) end |