Class: Ruflet::UI::Controls::RufletComponents::ChartAxisControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb
Constant Summary collapse
- TYPE =
"chartaxis".freeze
- WIRE =
"axis".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, title: nil, labels: nil, label_size: nil, title_size: nil, show_labels: nil) ⇒ ChartAxisControl
constructor
A new instance of ChartAxisControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, title: nil, labels: nil, label_size: nil, title_size: nil, show_labels: nil) ⇒ ChartAxisControl
Returns a new instance of ChartAxisControl.
11 12 13 14 15 16 17 18 19 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 11 def initialize(id: nil, title: nil, labels: nil, label_size: nil, title_size: nil, show_labels: nil) props = {} props[:title] = title unless title.nil? props[:labels] = labels unless labels.nil? props[:label_size] = label_size unless label_size.nil? props[:title_size] = title_size unless title_size.nil? props[:show_labels] = show_labels unless show_labels.nil? super(type: TYPE, id: id, **props) end |