Class: Ruflet::UI::Controls::RufletComponents::LineChartDataControl
- Inherits:
-
Control
- Object
- Control
- Ruflet::UI::Controls::RufletComponents::LineChartDataControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb
Constant Summary collapse
- TYPE =
"linechartdata".freeze
- WIRE =
"data".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, points: nil, color: nil, gradient: nil, stroke_width: nil, curved: nil, rounded_stroke_cap: nil) ⇒ LineChartDataControl
constructor
A new instance of LineChartDataControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, points: nil, color: nil, gradient: nil, stroke_width: nil, curved: nil, rounded_stroke_cap: nil) ⇒ LineChartDataControl
Returns a new instance of LineChartDataControl.
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 133 def initialize(id: nil, points: nil, color: nil, gradient: nil, stroke_width: nil, curved: nil, rounded_stroke_cap: nil) props = {} props[:points] = points unless points.nil? props[:color] = color unless color.nil? props[:gradient] = gradient unless gradient.nil? props[:stroke_width] = stroke_width unless stroke_width.nil? props[:curved] = curved unless curved.nil? props[:rounded_stroke_cap] = rounded_stroke_cap unless rounded_stroke_cap.nil? super(type: TYPE, id: id, **props) end |