pullmonkey / open_flash_chart
- Source
- Commits
- Network (33)
- Issues (0)
- Downloads (5)
- Wiki (1)
- Graphs
-
Tree:
8f73c43
commit 8f73c43c2d47a5ab03150de7f2e90978b93ea965
tree 0a90280bc66920a78c2c1ee5bf41a8657a039ff1
parent e27ac82e6614e6c9d30c81ec1caf4a4a829ecc4a
tree 0a90280bc66920a78c2c1ee5bf41a8657a039ff1
parent e27ac82e6614e6c9d30c81ec1caf4a4a829ecc4a
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Thu Jul 24 08:48:52 -0700 2008 | |
| |
README | Fri Nov 14 19:56:51 -0800 2008 | |
| |
Rakefile | Thu Jul 24 08:48:52 -0700 2008 | |
| |
assets/ | Thu Jan 08 12:50:06 -0800 2009 | |
| |
init.rb | Fri Dec 19 06:41:30 -0800 2008 | |
| |
install.rb | Fri Oct 24 20:44:29 -0700 2008 | |
| |
lib/ | ||
| |
tasks/ | Thu Jul 24 08:48:52 -0700 2008 | |
| |
test/ | Fri Nov 07 10:40:19 -0800 2008 | |
| |
uninstall.rb | Thu Jul 24 08:48:52 -0700 2008 |
README
OpenFlashChart Version 2.0.0 11/14/2008
==============
1) rails ofc2_test_app
2) cd ofc2_test_app
3) script/plugin install git://github.com/pullmonkey/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
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.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

