Sign in to follow this  

Reload / reInit / remove a chart??

Recommended Posts



I am using pro version of FusionCharts and trying drill down functionality using PHP and Javascript.




I am using a series of charts for drill downs .. I mean ..


Click in chart A -> updates chart B


Click in chart B -> updates Chart C


Click in chart C -> updates D, E and F.




Now that D,E, and F are loaded, if I click on chart B, the charts D, E, and F remain loaded. But I want them to be dependent on C.




Is it possible that after first drill down till D, E, F if I click back on B, charts D,E,F are re-initiated / removed / reloaded to blank?? so that I can click on C to refresh them with fresh values (depending upon click in C).




Please help. If you don't get the question I can try rephrasing all!!







Share this post

Link to post
Share on other sites


This is possible.

All you need to do is to code up your drill down function according to your needs.

Since, I am not aware of which environmetn you are using, it wont be possible to comment on the coding part.

But, you can always set a chart blank by updating <chart></chart> XML to it.

Share this post

Link to post
Share on other sites



Thanks for your reply.


Yes, it was about coding/logic flow.




I have another question related to this functionality.


As I am using series of drill down .. when I click on Chart C I load D,E,F,G,H,I (6-7) other charts. It works fine but sometimes one or two of the charts will not load and I see message error loading data. Just a re-click on Chart C makes these charts work fine. Is it due to number of charts on the same page? Any idea to avoid this situation will definitely be a great help.




Could not stop myself from another question.


This is more with javascript .. should I put this in Java Script Problems section??




  function toggleme(elem) {    

      elem = document.getElementById(elem);    

      if ( == 'block' || == '')
 = 'none';

 = 'block';    




I am using this function to show/hihde some charts. Its show/hide functionality works but when I hide a section and then ask show all the charts of that section are reset!! Section 1 has charts A,B - Section 2 has C,D which get updated by click in A or B. But click on show/hide (above js function) for section 2 makes it hide/show but resets charts C & D as well!!


Is it possible to avoid this? if yes please guide.




Thank you for your valuable time.



Share this post

Link to post
Share on other sites


I bet you wont get this display:none -> display:block issue in Internet Explorer.

Most probably you are providing data usign dataXML method.

This is because, in IE, an HTML Element does NOT get re-rerendered when display is set to block after hiding it once. Firefox etc. re-renders the HTML element.

What's happening in this case is when a chart is rendered for the first time using FusionChats.js it actually sets an <object>...</object> (in IE) or <embed/> element in Firefox etc. where the chart SWF is embeedded as a Flash Movie.

In this embedded object the first rendered chart's XML is set somewhere as a FlashVar in the <embed> node. Now you might have keep on updating the chart using setDataXML/setDataURL (updateChartXML() in FREE chart) . THIS process wont change the original HTML of the chart (<embed>) .

So, once you hide the chart and and show it again the ORIGINAL html gets rendered again and you are getting the original chart.

This is an issue in Firefox which we cant help change. But we have written a fix for this process:

1. Either use dataURL method


2. Get the javaScript fix. I have posted this fox somewhere in the forum. Please have it fmo there.

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