O'Reilly logo

FusionCharts by Shamasis Bhattacharya, Pallav Nadhani, Sanket Nadhani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — Writing the HTML and JavaScript code to embed the chart

  1. Create an empty HTML file within the FirstChart folder named as FirstChart.html.
  2. Paste the following code in the file and save it:
    <html>
    <head>
    <title>My First chart using FusionCharts</title>
    <script type="text/javascript" src="../FusionCharts/FusionCharts.js">
    </script>
    </head>
    <body>
    <div id="chartContainer">FusionCharts will load here!</div>
    <script type="text/javascript">
    <!-- var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" );
    myChart.setXMLUrl("Data.xml");
    myChart.render("chartContainer");//-->
    </script>
    </body>
    </html>
    
  3. Open it in a web browser. You should see your first chart coming to life, as shown in the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required