About ruby on rails, hackintosh, iphone3g and etc.

Sunday, February 22, 2009

Open Flash Chart

OpenFlashChart is an excellent flash based charting tool. It has been ported to Ruby. A very useful tutorial by pullmonkey.com http://pullmonkey.com/2008/7/25/using-a-database-to-populate-an-open-flash-chart-graph.

To install the plugin:

script/plugin install git://github.com/pullmonkey/open_flash_chart.git

Then, copy swfobject.js from the plugin's assets/ directory. 

That's all. For coding steps, please refer to the link above.

"Code below extracted from pullmonkey.com"

open_flash_chart_object()

Usage:

This method returns only the graph html:
@graph = open_flash_chart_object(....)

Arguments

  • width (required)
  • height (required)
  • url (required)
  • use_swfobject (optional and defaults to true)
  • base (optional and defaults to "/")
  • swf_file_name (optional and defaults to "open-flash-chart.swf")

No comments: