Module: GoogleChart::Legend
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
4 5 6 |
# File 'lib/google_chart/legend.rb', line 4 def self.included(klass) klass.register!(:legend) end |
Instance Method Details
#legend ⇒ Object
12 13 14 |
# File 'lib/google_chart/legend.rb', line 12 def legend "chdl=#{@legend.join('|')}" if @legend end |
#legend=(legend) ⇒ Object
8 9 10 |
# File 'lib/google_chart/legend.rb', line 8 def legend=(legend) @legend = [legend].flatten.map {|l| CGI::escape(l.to_s) } end |