satheesans

Stacked Area 2D Chart is not working javascript mode

Recommended Posts

Hi,

 

If we render chart in javascript mode, Fusion Stacked Area 2D chart is not working. The screen shows "Chart type not supported". When i enabled debug mode, I see the following error

 

"NetworkError: 404 Not Found - https://<<full webapp url will come here>>/FusionCharts.HC.stackedarea2d.js" (I have removed the rela web app url)

 

All the required js files are available in the application. Pleae find the attached image for more details

 

post-51401-0-42514900-1386097576_thumb.jpg

 

Please can you let me know what is the real issue here.

 

Best Regards,

 

Sudheesh

Edited by satheesans

Share this post


Link to post
Share on other sites

Hi Sashi,

 

Pleae find the following code snippet attached which is taken from my code base. Also I would like to mention here that I am using licensed version of Fusion chart not evaluation copy

 

post-51401-0-98365200-1386244621_thumb.jpg

 

 

Could you please check and let me know whether i am doing anything wrong here.

 

Best Regads,

Sudheesh

Edited by satheesans

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi Sudheesh,

 

Thank you for your more inputs.

 

It seems form the code snippet, you have provided the correct chart type. But, the 404 error will come if the chart type provided was wrong and the FusionCharts framework is looking for that wrong chart type "stackedarea2d.js".

 

Could you please try once, by providing the JavaScript alias name of the chart instead of SWF file URL?

 

Your code snippet:

var myChart = new FusionCharts( "/media/Charts/StackedArea2D.swf", "myChartId", "800", "400", "0", "1");

Replace with

var myChart = new FusionCharts( "StackedArea2D", "myChartId", "800", "400", "0", "1");

Hope this helps!

Share this post


Link to post
Share on other sites

Hi Sashi,

 

Many thanks for the input. Unfortunately, I tried that option also. Still I am getting the same 404 error and hence the chart is not rendering. Please find the following updated code snippet.

 

            myChart = new FusionCharts( "StackedArea2D", "myChartId", "800", "400", "0");
            FusionCharts.debugMode.enabled(true);
            FusionCharts.debugMode.outputTo( function() { console.log(arguments); } );
            
            myChart.setXMLData(finalChartXml);

 

Not sure what is the exact issue here. I have cross checeked Fusion Chart demo site and the code are seems to be similar

 

- Sdheesh

Share this post


Link to post
Share on other sites

Hi Sumedh,

 

I just copy pasted the same code what you have given to the application. But avail no luck.

 

I am not sure why the chart isnot working in javacript mode. One more information I missed out last time is I am using this chart in a portal application not norma web application although it won't make any difference. Also the javascript fiils and flash files are stored not in he same ear/ war file but it is available in the webserver path. This chart is woring fine in flash mode.

 

- Sdheesh

Share this post


Link to post
Share on other sites

Hi Sudheesh,

 

It appears that FusionCharts.js is not able to load the other required files. This happens when the HTML (or JSP) file is not present in the same path where JS files of FusionCharts are present. You are able to see Flash charts because flash chart does not require the other JS files to be present along with FusionCharts.js.

 

For testing this, you may try opening the other files from the URL in the error you pasted above. It is more likely that you will not be able to access these files using this URL.

 

For avoiding this, please try explicitly loading all the JS files using the script tag (same like you load FusionCharts.js) and let me know if this helps.

 

Awaiting your response.

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