Class: Ruflet::UI::Controls::RufletComponents::ScatterChartSpotControl

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

Constant Summary collapse

TYPE =
"scatterchartspot".freeze
WIRE =
"ScatterChartSpot".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, x: nil, y: nil, radius: nil, color: nil) ⇒ ScatterChartSpotControl

Returns a new instance of ScatterChartSpotControl.



309
310
311
312
313
314
315
316
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 309

def initialize(id: nil, x: nil, y: nil, radius: nil, color: nil)
  props = {}
  props[:x] = x unless x.nil?
  props[:y] = y unless y.nil?
  props[:radius] = radius unless radius.nil?
  props[:color] = color unless color.nil?
  super(type: TYPE, id: id, **props)
end