Class: GoogleCharts::Charts::Line

Inherits:
Base
  • Object
show all
Defined in:
lib/google_charts/charts/line.rb

Direct Known Subclasses

Area, Bar, Column

Instance Method Summary collapse

Methods inherited from Base

#title, #to_html

Constructor Details

#initialize(template, collection, options = {}, html_options = {}) ⇒ Line

Returns a new instance of Line.



4
5
6
7
8
# File 'lib/google_charts/charts/line.rb', line 4

def initialize( template, collection, options = {}, html_options = {} )
  super

  @label, @values = [], []
end

Instance Method Details

#label(name, method) ⇒ Object



10
# File 'lib/google_charts/charts/line.rb', line 10

def label( name, method ); @label = [name, method]; end

#value(name, method) ⇒ Object



11
# File 'lib/google_charts/charts/line.rb', line 11

def value( name, method ); @values << [name, method]; end