Class: Ruflet::UI::Controls::RufletComponents::PieChartControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb
Constant Summary collapse
- TYPE =
"piechart".freeze
- WIRE =
"PieChart".freeze
Constants inherited from Control
Instance Attribute Summary
Attributes inherited from Control
#children, #id, #props, #runtime_page, #type, #wire_id
Instance Method Summary collapse
-
#initialize(id: nil, width: nil, height: nil, sections: nil, sections_space: nil, center_space_radius: nil, tooltip: nil, on_event: nil) ⇒ PieChartControl
constructor
A new instance of PieChartControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, width: nil, height: nil, sections: nil, sections_space: nil, center_space_radius: nil, tooltip: nil, on_event: nil) ⇒ PieChartControl
Returns a new instance of PieChartControl.
161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 161 def initialize(id: nil, width: nil, height: nil, sections: nil, sections_space: nil, center_space_radius: nil, tooltip: nil, on_event: nil) props = {} props[:width] = width unless width.nil? props[:height] = height unless height.nil? props[:sections] = sections unless sections.nil? props[:sections_space] = sections_space unless sections_space.nil? props[:center_space_radius] = center_space_radius unless center_space_radius.nil? props[:tooltip] = tooltip unless tooltip.nil? props[:on_event] = on_event unless on_event.nil? super(type: TYPE, id: id, **props) end |