Class: Ruflet::UI::Controls::RufletComponents::PieChartSectionControl

Inherits:
Control
  • Object
show all
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

Control::HOST_EXPANDED_TYPES

Instance Attribute Summary

Attributes inherited from Control

#children, #id, #props, #runtime_page, #type, #wire_id

Instance Method Summary collapse

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] = badge_widget unless badge_widget.nil?
  props[:badge_position_percentage_offset] = badge_position_percentage_offset unless badge_position_percentage_offset.nil?
  super(type: TYPE, id: id, **props)
end