Open Flash Chart 2 API Module for Drupal

This is a demonstration page of Open Flash Chart 2 API for Drupal. For information on how to install and code examples, please visit the documentation page on drupal.org.

First things first, here's the sample chart that comes with the API:

Get Adobe Flash player

The above chart is rendered using data file method. You can see its data in JSON format at /ofc_api/data/ofc_api_sample

Next, on the left is a pie chart created by a custom module using the built-in API. And on the right is a radar chart created by the same module using the third party API (php-ofc-library). These two charts also use the data file method as well:
(FYI, the Firefox slice is clickable just for fun)

Get Adobe Flash player
Get Adobe Flash player

The data for the pie chart is located at /ofc_api/data/ofc_demo_pie_chart. And the data for the radar chart is located at ofc_api/data/ofc_demo_radar_chart.

The following chart is rendered using JavaScript method. The PHP code used to create the chart is put right here in the node body. And the chart is rendered on-the-fly without creating any function or module.

Get Adobe Flash player

The data for the above chart is embeded in this page using JavaScript. You can see the JSON being wrapped in a <script> tag in the <head> section when you view the source of this page.

Here's some more advanced line chart and its data. All values above 1.75 will get a red dot. Clicking any dot with its value above 2.3 will take you to Google:

Get Adobe Flash player

That's it for the demonstration. Please feel free to leave any comments or suggestions on how to improve this module :) Thanks!

8 comments

Anonymous's picture
joe ekine (visitor) says:

Thank you for this great drupal module. :)

Anonymous's picture
onequad (visitor) says:

สุดยอดดดดดดด ^ ^

Anonymous's picture
Anonymous (visitor) says:

Thats a cool one...Cheers!!!

kong's picture
kong says:

Thank you for comments!

I have updated the demo to show some clickable stuffs in pie chart and advanced line chart, you may want to check it out :)

Anonymous's picture
Jeimson Wadson (visitor) says:

Very useful website, wants to see much more on it! Go on!

Anonymous's picture
Barone (visitor) says:

Well done!

Anonymous's picture
Anonymous (visitor) says:

Thank for your module, I am using the module on a project but i get a problem when turn on drupal cache. After turning on drupal paga cache, chart don't show because of invalid json format.

have you tried this?

kong's picture
kong says:

Hi,

Actually on this site I have caching mode set to normal and page compression is enabled and everything seems to work fine.

So I'm not sure if it's because of the module, but I'll look for more info about this.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.