Sign in to follow this  
matthiasmax

"chart Id Is Same As A Javascript Variable Name" When Using Jquery Plugin.

Recommended Posts

Hi,
I'm getting this error in the FireBug console when I fire the function which loads the chart the second time.
This is my code insde this function:

        

 

   if (FusionCharts(domID)) {


                $("div[id$=" + containerID + "Body]").children(':first').updateFusionCharts({ "dataSource": "../../" + parChart.getDataURL(),
                    "dataFormat": "xmlurl"
                });

            } else {


                $("div[id$=" + containerID + "Body]").children(':first').insertFusionCharts({ "id": domID,
                    "swfUrl": type,
                    "renderer": "javascript",
                    "dataSource": "../../" + parChart.getDataURL(),
                    "dataFormat": "xmlurl",
                    "width": width,
                    "height": height
                });

            }
 

My question is - how do I set the chart created by insertFusionCHart to a variable? It's possible without the jQuueryy plugin - but how do I do it now?

 

Thanks.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi ,

 

Welcome to FusionCharts Forum!

 

We are looking into this and we will get back to you on this shortly.

Share this post


Link to post
Share on other sites

Hi ,

 

Welcome to FusionCharts Forum!

 

We are looking into this and we will get back to you on this shortly.

 

Hi,

I'm getting this error in the FireBug console when I fire the function which loads the chart the second time.

This is my code insde this function:

        

 

   if (FusionCharts(domID)) {


                $("div[id$=" + containerID + "Body]").children(':first').updateFusionCharts({ "dataSource": "../../" + parChart.getDataURL(),
                    "dataFormat": "xmlurl"
                });

            } else {


                $("div[id$=" + containerID + "Body]").children(':first').insertFusionCharts({ "id": domID,
                    "swfUrl": type,
                    "renderer": "javascript",
                    "dataSource": "../../" + parChart.getDataURL(),
                    "dataFormat": "xmlurl",
                    "width": width,
                    "height": height
                });

            }
 

My question is - how do I set the chart created by insertFusionCHart to a variable? It's possible without the jQuueryy plugin - but how do I do it now?

 

Thanks.

I am also getting same error I have posted it @ http://forum.fusioncharts.com/topic/13627-chart-id-is-same-as-a-javascript-variable-name/

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

I'm getting this error in the FireBug console when I fire the function which loads the chart the second time.

This is my code insde this function:

        

 

   if (FusionCharts(domID)) {


                $("div[id$=" + containerID + "Body]").children(':first').updateFusionCharts({ "dataSource": "../../" + parChart.getDataURL(),
                    "dataFormat": "xmlurl"
                });

            } else {


                $("div[id$=" + containerID + "Body]").children(':first').insertFusionCharts({ "id": domID,
                    "swfUrl": type,
                    "renderer": "javascript",
                    "dataSource": "../../" + parChart.getDataURL(),
                    "dataFormat": "xmlurl",
                    "width": width,
                    "height": height
                });

            }
 

My question is - how do I set the chart created by insertFusionCHart to a variable? It's possible without the jQuueryy plugin - but how do I do it now?

 

Thanks.

 

 

Hi,

 

You can use standard JavaScript rendering method to render the chart (without using jQuery plugin).

 

For more information, please refer the following link:

http://docs.fusioncharts.com/charts/contents/FirstChart/FirstChart.html

 

If this doesn't suffice your requirement, can you please elaborate a bit more on your requirement?

Share this post


Link to post
Share on other sites

Hi, thanks for the proposal but this is really not helping much. My whole website and calls to FusionCHart are already in jQUery.

I now want to add a change of type on the client side which is why I need to call the chart second time via the javascript variable.

 

Or is there another way?

 

Thank you.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Do you want to change the chart type of existing one?

 

If you want to change the chart type, then you can use "updateFusionCharts" function.

 

Ref. Code:

$("#chartContainer").updateFusionCharts({"swfUrl": "FusionCharts/Pie3D.swf"});

 

For more information, please refer the following links:

http://docs.fusioncharts.com/charts/contents/jQuery/RetrieveUpdate.html

 

http://docs.fusioncharts.com/charts/Code/jquery/BasicExample/ChangeType.html

 

If this doesn't suffice your requirement, please do let us know what is your exact requirement?

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