Class: Ruflet::UI::Controls::RufletComponents::PieChartSectionControl
- Inherits:
-
Control
- Object
- Control
- Ruflet::UI::Controls::RufletComponents::PieChartSectionControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb
Constant Summary collapse
- TYPE =
"piechartsection".freeze
- WIRE =
"section".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, value: nil, title: nil, color: nil, radius: nil, title_style: nil, badge_widget: nil, badge_position_percentage_offset: nil) ⇒ PieChartSectionControl
constructor
A new instance of PieChartSectionControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, value: nil, title: nil, color: nil, radius: nil, title_style: nil, badge_widget: nil, badge_position_percentage_offset: nil) ⇒ PieChartSectionControl
Returns a new instance of PieChartSectionControl.
178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 178 def initialize(id: nil, value: nil, title: nil, color: nil, radius: nil, title_style: nil, badge_widget: nil, badge_position_percentage_offset: nil) props = {} props[:value] = value unless value.nil? props[:title] = title unless title.nil? props[:color] = color unless color.nil? props[:radius] = radius unless radius.nil? props[:title_style] = title_style unless title_style.nil? props[:badge_widget] = unless .nil? props[:badge_position_percentage_offset] = badge_position_percentage_offset unless badge_position_percentage_offset.nil? super(type: TYPE, id: id, **props) end |