Class: Ruflet::UI::Controls::RufletComponents::BarChartRodControl

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

Constant Summary collapse

TYPE =
"barchartrod".freeze
WIRE =
"rod".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, width: nil, color: nil, gradient: nil, border_radius: nil, rod_stack_items: nil) ⇒ BarChartRodControl

Returns a new instance of BarChartRodControl.



78
79
80
81
82
83
84
85
86
87
88
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 78

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