jparker / ruby-googlechart

A ruby interface to the Google Chart API

ruby-googlechart / lib / google_chart.rb
100644 31 lines (24 sloc) 0.779 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$:.unshift(File.dirname(__FILE__)) unless
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
 
require 'cgi'
 
require 'array'
 
require 'google_chart/axis'
require 'google_chart/bar_style'
require 'google_chart/color'
require 'google_chart/data'
require 'google_chart/grid_line'
require 'google_chart/legend'
require 'google_chart/line_style'
require 'google_chart/range_marker'
require 'google_chart/title'
 
require 'google_chart/abstract_chart'
require 'google_chart/bar_chart'
require 'google_chart/line_chart'
 
module GoogleChart
  def self.Line(options = {}, &block)
    GoogleChart::LineChart.new(options, &block).to_url
  end
  
  def self.Bar(options = {}, &block)
    GoogleChart::BarChart.new(options, &block).to_url
  end
end