Ok, already, I heard ya The open flash chart (version 2 - OFC2) plugin is done (really just started) and it is out on github.
Examples for version 2 are here.
I rewrote the open flash chart plugin (started from scratch) to work with json like teethgrinder does here.
This time I think it is much slicker and a lot easier to work with.
I haven't tried much more than bar graphs, all the functionality is there for other types of graphs, just not tested.
Graph that this example produces:
So it is out there, and if you are willing to try it out, here is how:
- rails testing_ofc_2
- cd testing_ofc_2
- script/plugin install git://github.com/pullmonkey/open_flash_chart.git
- script/generate controller test_it
- Add the following to the test_it_controller.rb in RAILS_ROOT/app/controllers:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
class TestItController < ApplicationController def index @graph = open_flash_chart_object(600,300,"/test_it/graph_code") end def graph_code title = Title.new("MY TITLE") bar = BarGlass.new bar.set_values([1,2,3,4,5,6,7,8,9]) chart = OpenFlashChart.new chart.set_title(title) chart.add_element(bar) render :text => chart.to_s end end
- Add the following to index.html.erb in RAILS_ROOT/app/views/test_it/:
1 2 3 4 5
- Copy open-flash-chart.swf from the plugin's assets/ director to your RAILS_ROOT/public/ directory
- Browse to http://localhost:3000/test_it
- Let me know how it goes, thanks.