Class: LesliView::Widgets::Chart

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/lesli_view/widgets/chart.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title = nil, data = nil, type: :bar) ⇒ Chart

Returns a new instance of Chart.



38
39
40
41
42
# File 'lib/lesli_view/widgets/chart.rb', line 38

def initialize(title=nil, data=nil, type: :bar)
    @title = title
    @data = data
    @type = type
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



36
37
38
# File 'lib/lesli_view/widgets/chart.rb', line 36

def data
  @data
end

#titleObject (readonly)

Returns the value of attribute title.



36
37
38
# File 'lib/lesli_view/widgets/chart.rb', line 36

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



36
37
38
# File 'lib/lesli_view/widgets/chart.rb', line 36

def type
  @type
end