Class: GChart::Sparkline

Inherits:
Base
  • Object
show all
Defined in:
lib/gchart/sparkline.rb

Instance Attribute Summary

Attributes inherited from Base

#axes, #chart_background, #colors, #data, #entire_background, #extras, #height, #legend, #max, #title, #width

Instance Method Summary collapse

Methods inherited from Base

#axis, #fetch, #size, #size=, #to_url, #write

Constructor Details

#initialize(*args, &block) ⇒ Sparkline

Sparklines are essentially the same as line charts, but without axis lines. Because they are often placed within text, the default size should be smaller.



6
7
8
9
10
# File 'lib/gchart/sparkline.rb', line 6

def initialize(*args, &block)
  super(*args, &block)
  @width = "60"
  @height = "20"
end

Instance Method Details

#render_chart_typeObject

:nodoc:



11
12
13
# File 'lib/gchart/sparkline.rb', line 11

def render_chart_type #:nodoc:
  "ls"
end