Generating Open Flash Charts from Rails Application Data
by
Saurabh Bhatia
Creating charts is a very important function if your app provides some kind of analytics related to particular data. Open Flash Chart provides a good interface for graphically representing your application's data. This article explains how to include Open Flash Charts in a Rails application.
A few Ruby on Rails plugins allow you to include Open Flash Charts in Rails applications. The one written by PullMonkey seems to be the most stable, and it is pretty straightforward to use. For Java, you use Open Flash Chart to show the data and the Java plugin to pass your data to Open Flash Chart. In this article, we will use PullMonkey.
Installing PullMonkey
Let's start by creating a blank Ruby on Rails application and installing the PullMonkey Open Flash Charts plugin.
safew@ltsp:~/ofc$ script/plugin install http://github.com/pullmonkey/open_flash_chart.git
Copy the javascripts and SWF objects from the plugin directory to the application directory. Here is the list of those files:
swfobject.js
open-flash-chart-bar-clicking.swf
open-flash-chart.swf
safew@ltsp:~/ofc/vendor/plugins/open_flash_chart/assets$ sudo cp -r * /home/safew/ofc/public/
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.