public
Description: A ruby interface to the Google Chart API
Home | Edit | New

Home

ruby-googlechart

ruby-googlechart is a ruby wrapper around the Google Charts API.

Usage


GoogleChart.Line(:data => [523, 614, 717, 816])

GoogleChart.Line do |c|
  c.data = [523, 614, 717, 816]
  c.encoding = :extended
  c.scale = 0..1_000
  c.size = '800x375'
  c.style = [:solid, :dot]
  c.width = [1, 3]
  c.color = %w[00aa00 ff000055]
  c.title = "Lorem Ipsum Dolor"
end

GoogleChart.Bar(:data => [Math::PI, Math::E], :encoding => :text)

GoogleChart.Bar do |c|
  c.data = [[2, 4, 6], [1, 3, 5]]
  c.size = '300x200'
  c.width = 85
  c.spacing = 5
  c.axes = {:x => %w[Foo Bar Baz], :y => 0..11}
  c.color = %w[00aa00aa 00aa0044]
  c.grouping = :stack
end

Last edited by jparker, Sun Nov 23 02:32:46 -0800 2008
Home | Edit | New
Versions: