Sign in to follow this  
Sagar Kamate

Fusion Chart Object With The Specified Id 'chartid' Already Exist

Recommended Posts

Hello,

 

I have four different charts on a single page.

 

When i select the criteria it rebinds and shows the chart.

 

But at the same time it throws the error in Java Script as 'Fusion chart object with the specified id 'ChartId' already exist'.

post-27919-0-21391700-1333955364_thumb.png

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

This might happen, when you have a JavaScript variable in the global window scope with the same name as that of the chart's Id.

 

the javascript variable name and the chart id shouldn't be same.

 

Ref. Code:

var myChart=new ( "FusionCharts/Column3D.swf","myChart", "300", "300", "0", "1" );

 

In above code, myChart is replicated as a variable name as well as a chart ID.

 

It should be like:

var myChart=new ( "FusionCharts/Column3D.swf","myChartID", "300", "300", "0", "1" );

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

This might happen, when you have a JavaScript variable in the global window scope with the same name as that of the chart's Id.

 

the javascript variable name and the chart id shouldn't be same.

 

Ref. Code:

var myChart=new ( "FusionCharts/Column3D.swf","myChart", "300", "300", "0", "1" );

 

In above code, myChart is replicated as a variable name as well as a chart ID.

 

It should be like:

var myChart=new ( "FusionCharts/Column3D.swf","myChartID", "300", "300", "0", "1" );

 

Hope this helps.

 

I also found that in JavaScript mode you have to delete the chart first before you add it again:

 

 

if ( FusionCharts( chartId ) ) FusionCharts( chartId ).dispose();

Share this post


Link to post
Share on other sites

I also found that in JavaScript mode you have to delete the chart first before you add it again:

 

 

if ( FusionCharts( chartId ) ) FusionCharts( chartId ).dispose();

 

 

Thank You!

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