{"id":51540,"date":"2009-01-08T20:58:00","date_gmt":"2009-01-08T20:58:00","guid":{"rendered":"\/2009\/01\/08\/open-flash-chart-ii-bar-graphs-with-on-click"},"modified":"2009-08-30T04:35:25","modified_gmt":"2009-08-30T04:35:25","slug":"open-flash-chart-ii-bar-graphs-with-on-click","status":"publish","type":"post","link":"http:\/\/pullmonkey.com\/2009\/01\/08\/open-flash-chart-ii-bar-graphs-with-on-click\/","title":{"rendered":"Open Flash Chart II – Bar Graphs with on-click"},"content":{"rendered":"

Building on line graph clicking<\/a>, thanks to the support of a few other people (mentioned throughout the article) we now have bar graph clicking as well. The only down side (if you want to call it that) is that it is experimental in the sense that the open flash chart swf object had to be updated, and the update is not part of the official OFC release (at least not at the time of this writing). No big deal though, just be aware. It is however part of the OFC rails plugin release<\/a>.
\nBig thanks goes to
Eric<\/a> for his work on the action script for the bar clicking open-flash-chart swf file - see this forum entry<\/a> for more details.
\nObvious thanks also goes to
monk.e.boy<\/a>.<\/p>\n

Ok, so two things to note for this to work:<\/p>\n

    \n
  1. Pull the latest from github and make sure to get Eric's swf file (under the assets directory - open-flash-chart-bar-clicking.swf<\/a> ) and place it under RAILS_ROOT\/public<\/li>\n
  2. The call to open_flash_chart_object() has changed to accept an optional parameter for the swf file name. I am leaving the original for use as open-flash-chart.swf (which is the default for the swf_file_name param) and added Eric's as open-flash-chart-bar-clicking.swf. See the example below for usage.<\/li>\n<\/ol>\n

    \nThe changes that were made can be found here<\/a>.<\/p>\n

    Here is the graph we are after in this example (click the bars to see what happens):
    \n