public
Description: The ruby on rails plugin for teethgrinder's Open Flash Chart (version 2)
Homepage: http://pullmonkey.com/projects/open_flash_chart2/
Clone URL: git://github.com/pullmonkey/open_flash_chart.git
pullmonkey (author)
Thu Apr 30 08:27:39 -0700 2009
commit  7ca9f9dbea795431aafdcc3a20dd4b73900f6fba
tree    11e2e02d066efee017750e13548a19eb623c3dc2
parent  2eb746bdc51e191de09ac09a4656dca72a86cc21
open_flash_chart / lib / ofc / examples / line.rb
100644 24 lines (20 sloc) 0.742 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
module OFC
  module Examples
    module Line
      # http://teethgrinder.co.uk/open-flash-chart-2/data-lines.php
      def line
        #$title = new title( date("D M d Y") );
        title = OFC::Title.new(:text => Time.now.strftime("%a %b %d %Y"))
 
        #$line_dot = new line();
        #$line_dot->set_values( array(1,2,1,null,null,null,null,null) );
        line_dot = OFC::Line.new(:values => [1,2,1,nil,nil,nil,nil,nil])
 
        #$chart = new open_flash_chart();
        #$chart->set_title( $title );
        #$chart->add_element( $line_dot );
        chart = OFC::OpenFlashChart.new(:title => title, :elements => [line_dot])
 
        #echo $chart->toPrettyString();
        render :text => chart.render
      end
    end
  end
end