Class: GoogleChart::LineChart

Inherits:
AbstractChart show all
Includes:
Axis, Color, Data, GridLine, Legend, LineStyle, RangeMarker, Title
Defined in:
lib/google_chart/line_chart.rb

Constant Summary collapse

@@chart_types =
{ :line => 'lc', :xy => 'lxy', :sparkline => 'ls' }

Instance Attribute Summary

Attributes included from Data

#scale

Attributes inherited from AbstractChart

#size

Instance Method Summary collapse

Methods included from Title

included, #title, #title=

Methods included from RangeMarker

included, #ranges, #ranges=

Methods included from LineStyle

included, #style, #style=, #width=

Methods included from Legend

included, #legend, #legend=

Methods included from GridLine

#grid, #grid=, included

Methods included from Data

#data, #data=, included

Methods included from Color

#color, #color=, included

Methods included from Axis

#axes, #axes=, included

Methods inherited from AbstractChart

inherited, #initialize, register!, registered?, registry, #to_url

Constructor Details

This class inherits a constructor from GoogleChart::AbstractChart

Instance Method Details

#chart_typeObject



14
15
16
17
# File 'lib/google_chart/line_chart.rb', line 14

def chart_type
  @chart_type ||= @@chart_types[:line]
  'cht=' + @chart_type if @chart_type
end

#chart_type=(chart_type) ⇒ Object Also known as: type=



19
20
21
# File 'lib/google_chart/line_chart.rb', line 19

def chart_type=(chart_type)
  @chart_type = @@chart_types[chart_type]
end