Class: Ruflet::UI::Controls::RufletComponents::BarChartRodStackItemControl

Inherits:
Control
  • Object
show all
Defined in:
lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb

Constant Summary collapse

TYPE =
"barchartrodstackitem".freeze
WIRE =
"stack_item".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, from_y: nil, to_y: nil, color: nil, border_side: nil) ⇒ BarChartRodStackItemControl

Returns a new instance of BarChartRodStackItemControl.



95
96
97
98
99
100
101
102
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 95

def initialize(id: nil, from_y: nil, to_y: nil, color: nil, border_side: nil)
  props = {}
  props[:from_y] = from_y unless from_y.nil?
  props[:to_y] = to_y unless to_y.nil?
  props[:color] = color unless color.nil?
  props[:border_side] = border_side unless border_side.nil?
  super(type: TYPE, id: id, **props)
end