Sign in to follow this  
Isaac

Multiple Charts, Jquery, And Json

Recommended Posts

So, I have a simple scenario: I have multiple charts and I'd like to provide them JSON data. I'm on the latest version.

 

Now, I know I can go through the work of giving them unique IDs and provide them individually to the render() function, but my code would be much cleaner if I could just generate a chart for each <div class='chart' dataUrl= '/getSomeSpecificJson'/>. All I need to make that easy is to have the render function take the div itself instead of the ID of that div. Then I could loop through $(".chart") and call render() on each one. Is that possible?

 

I have noticed that the experimental jquery plugin lets you do this: $(".chart").each(function(){$(this).insertFusionCharts(...)}), which is great, but without learning my way around the plugin code, it's not clear how it's doing that under the covers and thus difficult to replicate in my own code. I'd be happy to just use the plugin (it's really quite nice), but I don't see how to configure JSON data from that plugin; as far as I can tell, it only provides the functionality to use XML. So another, even better, way to solve my problem would be to tell me how to use the jquery plugin to set a json data URL.

 

Answers to either of those issues would rock my world. Thanks!

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

Glad that your issue is resolved.

 

Keep smiling and keep FusionCharting. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this