rafal

renderChartFromExtXML and FC_Rendered js function problem

Recommended Posts

Hi,

 

 

 

I'm using function renderChartFromExtXML(string $dataXML, [boolean $renderAsHTML]) to draw charts on page.

 

When I set second parameter to 'true' there is a problem with function FC_Rendered(DOMId) - DOMId is null.

 

 

 

Example:

 

 

 


function FC_Rendered(DOMId){

  alert(DOMId);

}



$FC = new FusionCharts($swf,$width,$height,$chartId,true);



...



//For that code alert null as a DOMId after chart rendered.

$FC->renderChartFromExtXML($strXML,true);

 

 

 

If second parameter is set to 'false' function FC_Rendered(DOMId) works fine - DOMId is correct, but I cannot use that mode in AJAX call.

 

 

 

Example:

 

 

 


function FC_Rendered(DOMId){

  alert(DOMId);

}



$FC = new FusionCharts($swf,$width,$height,$chartId,true);

...



//For that code function FC_Rendered alert correct DOMId after chart rendered.

$FC->renderChartFromExtXML($strXML,true);

 

 

 

Is there any way to make function FC_Rendered(DOMId) work when renderAsHTML in renderChartFromExtXML is set to true?

 

 

 

 

 

Thanks for any help

 

Rafal

Share this post


Link to post
Share on other sites

Just to be clear the core problem is:

 

 

 

when a cart is displayed using renderChartFromExtXML($strXML,true);

 

the FC_Rendered returns null as the chart DOMId .

 

 

 

(When I tried to display the chart using renderChartFromExtXML($strXML,false); the FC_Rendered returns the correct value for chart DOMId.)

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Rafal,

You are most welcome.

Glad that we could help you.

Happy FusionCharting. :)

Share this post


Link to post
Share on other sites

Hi,

I have the same problem after upgrade to version 3.2 (draw chart using php class and cannot get chart object using javaScript - tried to use old getChartFromId('ID') and new FusionCharts('ID') , FusionCharts.items['ID']) - can you fix that please?

 

Thanks in advance

Rafal

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