Class: Ruflet::UI::Controls::RufletComponents::BarChartRodControl
- Inherits:
-
Control
- Object
- Control
- Ruflet::UI::Controls::RufletComponents::BarChartRodControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb
Constant Summary collapse
- TYPE =
"barchartrod".freeze
- WIRE =
"rod".freeze
- KEYWORDS =
[:from_y, :to_y, :width, :color, :gradient, :border_radius, :rod_stack_items].freeze
Constants inherited from Control
Control::HOST_EXPANDED_TYPES, Control::SCHEMA_METADATA_CACHE
Instance Attribute Summary
Attributes inherited from Control
#children, #id, #props, #runtime_page, #type, #wire_id
Instance Method Summary collapse
-
#initialize(id: nil, from_y: nil, to_y: nil, width: nil, color: nil, gradient: nil, border_radius: nil, rod_stack_items: nil) ⇒ BarChartRodControl
constructor
A new instance of BarChartRodControl.
Methods inherited from Control
#attach_handler, #emit, generate_id, #has_handler?, #merge_props, #on, #to_patch
Constructor Details
#initialize(id: nil, from_y: nil, to_y: nil, width: nil, color: nil, gradient: nil, border_radius: nil, rod_stack_items: nil) ⇒ BarChartRodControl
Returns a new instance of BarChartRodControl.
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 83 def initialize(id: nil, from_y: nil, to_y: nil, width: nil, color: nil, gradient: nil, border_radius: nil, rod_stack_items: nil) props = {} props[:from_y] = from_y unless from_y.nil? props[:to_y] = to_y unless to_y.nil? props[:width] = width unless width.nil? props[:color] = color unless color.nil? props[:gradient] = gradient unless gradient.nil? props[:border_radius] = border_radius unless border_radius.nil? props[:rod_stack_items] = rod_stack_items unless rod_stack_items.nil? super(type: TYPE, id: id, **props) end |