GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of pullmonkey/open_flash_chart
Description: The ruby on rails plugin for teethgrinder's Open Flash Chart (version 2)
Homepage: http://www.pullmonkey.com/projects/open_flash_chart
Clone URL: git://github.com/dfl/open_flash_chart.git
name age message
file MIT-LICENSE Thu Jul 24 08:48:52 -0700 2008 Initial commit [pullmonkey]
file README Fri Oct 24 22:54:45 -0700 2008 adding chart object with default title [dfl]
file Rakefile Thu Jul 24 08:48:52 -0700 2008 Initial commit [pullmonkey]
directory assets/ Fri Oct 24 20:44:29 -0700 2008 copy over assets on plugin installation [dfl]
file init.rb Fri Oct 24 21:40:03 -0700 2008 refactor to proper plugin architecture and name... [dfl]
file install.rb Fri Oct 24 20:44:29 -0700 2008 copy over assets on plugin installation [dfl]
directory lib/ Tue Oct 28 13:58:01 -0700 2008 adding linear regression class [dfl]
directory tasks/ Thu Jul 24 08:48:52 -0700 2008 Initial commit [pullmonkey]
directory test/ Mon Oct 27 10:17:04 -0700 2008 fixing stack overflow bug [dfl]
file uninstall.rb Thu Jul 24 08:48:52 -0700 2008 Initial commit [pullmonkey]
README
OpenFlashChart
==============

1) rails ofc2_test_app
2) cd ofc2_test_app
3) script/plugin install git://github.com/dfl/open_flash_chart.git
4) script/generate controller test_it

5) Add the following to the test_it_controller.rb in RAILS_ROOT/app/controllers:
class TestItController < ApplicationController
  include OpenFlashChart
  
  def index
    respond_to do |wants|
      wants.html {
        @graph = open_flash_chart_object( 600, 300, url_for( :action => 'index', :format => :json ) )
      }
      wants.json { 
        chart = OpenFlashChart::Chart.new( "MY TITLE" ) do |c|
          c << BarGlass.new( :values => (1..10).sort_by{rand} )
        end
        render :text => chart, :layout => false
      }
    end
  end

end

6) Add the following to index.html.erb in RAILS_ROOT/app/views/test_it/:
<html>
<head>
  <script type="text/javascript" src="/javascripts/swfobject.js"></script>
</head>
<body>
<%= @graph %>
</body>
</html>

7) script/server
8) Let me know how it goes, thanks.


Example
=======

Example above and more to follow here - http://www.pullmonkey.com/projects/open_flash_chart


Copyright (c) 2008 PullMonkey, released under the MIT license