PullMonkey Blog

05 Apr

Open Flash Chart Graphing for Ruby on Rails - Updates


Ok, great news. I have fixed a fairly large bug, Even better news, you probably never noticed it unless you were trying to output graphs via javascript, I.e., using graph.set_output_type("js").

Thanks go to Brandon, who provided an example of using javascript as the output type:





View Source Code


So if this was affecting you, then you will want to get the latest version of the plugin - Instructions.





4 Responses to “Open Flash Chart Graphing for Ruby on Rails - Updates”

  1. By Andrew Kuklewicz on Apr 5, 2008 | Reply

    I’ve been using the plugin, and found one problem with it.
    I wanted to use js to cause the flash chart to reload data, but in order to do so, I need the id of the flash obj. There is no way currently to get this that I could find, as the _ofc method throws a seq # in as part of the id, so I changed these methods a bit to add a final param to pass in the id. I did it as an extra param, probably would be more extensible to pass in a hash of options, and have one of them be the id of the flash obj. What do you think, is there a better way to do this?
    -Andrew

  2. By charlie on Apr 5, 2008 | Reply

    @Andrew - I think I see what you are saying. You want to reload the data that is in the div, where the div has an id like my_chart and some string? I think a solution would be to give the div a css class, then you can use prototype’s css selector like this $$(’.ofc_chart’) to get all the open flash chart divs on the page and you can reload each one or get the id of each one and go from there. Thoughts?

  3. By Scott Derrick on Apr 5, 2008 | Reply

    Can the line charts be oriented vertically?

    Thanks, Scott

  4. By charlie on Apr 5, 2008 | Reply

    @Scott - There is probably a trick to it, but not anything off the top of my head. I am using the swf from http://teethgrinder.co.uk/open-flash-chart/, and from what I can tell, it is not supported. But again, maybe there is a way to rotate the flash after the fact or some other trick?

Sorry, comments for this entry are closed at this time.