Class: Ruflet::UI::Controls::RufletComponents::RadarChartControl

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

Constant Summary collapse

TYPE =
"radarchart".freeze
WIRE =
"RadarChart".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, width: nil, height: nil, titles: nil, data_sets: nil, on_event: nil) ⇒ RadarChartControl

Returns a new instance of RadarChartControl.



234
235
236
237
238
239
240
241
242
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb', line 234

def initialize(id: nil, width: nil, height: nil, titles: nil, data_sets: nil, on_event: nil)
  props = {}
  props[:width] = width unless width.nil?
  props[:height] = height unless height.nil?
  props[:titles] = titles unless titles.nil?
  props[:data_sets] = data_sets unless data_sets.nil?
  props[:on_event] = on_event unless on_event.nil?
  super(type: TYPE, id: id, **props)
end