Sign in to follow this  
comerun

Complete Immigration To Javascript From Flash

Recommended Posts

Hi all,

 

I have been using the flash version of fusion charts with no issue. Now at this stage of time, I need to migrate completely to Javascript version.

I spent a lot of time to build up the current charts and prepare the related data required, so it would be much appreciated if someone from you team can give me some clues on how to switch to javascript without spending too much time.

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

A warm welcome to FusionCharts Forum! smile.gif

 

To render JavaScript charts, you would need to copy all the necessary JavaScript libraries into your project folder:

 

> FusionCharts.js

> FusionCharts.HC.js

> FusionCharts.HC.Charts.js

> jquery.min.js

 

 

To render JavaScript charts using the SWF file name along with its path. For this, you just have to add a line of code:

 

Ref. Code:

FusionCharts.setCurrentRenderer('javascript')

 

For more information, please refer the following links:

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

 

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

 

Hope this helps!

Share this post


Link to post
Share on other sites
some clues on how to switch to javascript without spending too much time.

 

So, you can understand that you do not need spend much time in coding to migrate to JavaScript. Its just the:

 

1.

 

FusionCharts.setCurrentRenderer('javascript')

 

placed somewhere in the code that is executed before you render any chart and

 

 

2. Copy pasting of the rquired JS files.

 

Enjoy!

Share this post


Link to post
Share on other sites

I think I had a progress but now I get this:

 

 

Error: DesignTimeError: #25081843 timelineChart.render Error >> #25081843:IECompatibility() Chart Id is same as a JavaScript variable name. Variable naming error. Please use unique name for chart JS variable, chart-id and container id.

 

 

can u please let me know how to resolve?

Share this post


Link to post
Share on other sites

There seems to be a "Variable naming error. Please use unique name for chart JS variable, chart-id and container id."

 

You need to check if your page contains a DIV or JS variable with the same name of the chart's id or your are rendering the chart more than once i.e. asking the chart to render with same ids.

 

However, it would be great if you can pass us a scaled down sample (preferably with HTML and JS and no server side script or database) that we can debug and fix for you. That would be quicker resolution.

Share this post


Link to post
Share on other sites

Hi,

 

From Stackoverflow, we found the code you are using:

 

barChart = new FusionCharts("/sei/static/flash/FCF_StackedBar2D.swf?ChartNoDataText= ", "barChartLarge", 460, 260, 0, 1);

 

It indicates that you are using charts from FusionCharts FREE and not FusionCharts XT. FusionCharts FREE does not support fallback to JavaScript charts.

 

However, since you are using the required JavaScript files of FusionChars XT, it is supposed to work provided you give the correct chart SWF files name of FusionCharts XT pack or JavaScript chart alias.

 

Hence, we would recommend you to use:

 

 

barChart = new FusionCharts("StackedBar2D", "barChartLarge", 460, 260, 0, 1);

 

i.e. using the JavaScript chart alias.

 

or

 

barChart = new FusionCharts("StackedBar2D.swf?ChartNoDataText= ", "barChartLarge", 460, 260, 0, 1);

 

i.e. the correct SWF file name of FusionCharts XT pack.

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