Sign in to follow this  
johnny

Documentation Incorrect

Recommended Posts

hello,

 

I'm using the documentation example on "Configuring charts to use JavaScript rendering on all browsers when required Flash Player is unavailable":

 

<html>
 <head> 
   <title>My First chart using FusionCharts - Using JavaScript</title> 
   <script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>
 </head> 
 <body> 
   <div id="chartContainer">FusionCharts will load here!</div> 
   <script type="text/javascript"><!--

     FusionCharts._fallbackJSChartsWhenNoFlash();

     var myChart = new FusionCharts( "FusionCharts/Column3D.swf",
        "myChartId", "400", "300", "0", "1" );
     myChart.setXMLUrl("Data.xml");
     myChart.render("chartContainer"); 
   // --> 
   </script>
 </body> 

 

however the above code doesn't trigger javascript if flash is disabled.

firebug tells me the following: FusionCharts._fallbackJSChartsWhenNoFlash is not a function

 

flash chart is working if remove the fallback line and javascript is working if i'm forcing it to trigger with javascript, so all files are there.

 

please help me to solve it.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

Please find the modified code below:

 

<html>

<head>

<title>My First chart using FusionCharts - Using JavaScript</title>

<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>

</head>

<body>

<div id="chartContainer">FusionCharts will load here!</div>

<script type="text/javascript"><!--

 

FusionCharts._fallbackJSChartWhenNoFlash();

 

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

myChart.setXMLUrl("Data.xml");

myChart.render("chartContainer");

// -->

</script>

</body> </html>

 

Hope this helps.smile.gif

Share this post


Link to post
Share on other sites

The above fixes the javascript trigger when flash is disabled, however now flash chart isn't working. :D

 

have you tested the above code yourself?

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

FusionCharts._fallbackJSChartWhenNoFlash() is the correct function which has been mentioned in the code earlier as: FusionCharts._fallbackJSChartsWhenNoFlash()

The code is working fine from our end.

 

The function works in this way:

 

FusionCharts JavaScript class will check whether there is Flash Player supported or installed in the browser. If the probing fails, it automatically switches the render mode to JavaScript based charts.

For more details, please refer to the link: http://www.fusioncharts.com/docs/?FirstChart/UsingPureJS.html

Hope this helps.smile.gif

Edited by Angie

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