FusionCharts Knowledge Base


How do I render charts using JavaScripts (without Flash)?

In case you wish to render only JavaScript based charts (and not use Flash at all), you would just need to add another line of code as shown below:

FusionCharts.setCurrentRenderer('javascript');

This code will ask FusionCharts renderer to skip Flash rendering and create pure JavaScript based charts.

The modified code will look like the following:

<html>
<head>
<title>My First chart using FusionCharts - Using pure 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.setCurrentRenderer('javascript'); var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); myChart.setDataURL("Data.xml"); myChart.render("chartContainer"); // --> </script> </body> </html>

See it live!

When you open this page, you would see that even in regular browsers, the chart comes in pure JavaScript form as shown below.





Related Articles

Attachments

No attachments were found.

Visitor Comments

Article Details

Last Updated
18th of October, 2010

Would you like to...

Print this page  Print this page

Email this page  Email this page

Post a comment  Post a comment

 Subscribe me

Subscribe me  Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit


User Opinions

100% thumbs up 0% thumbs down (7 votes)

How would you rate this answer?



Thank you for rating this answer.

Continue