Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Sencha Charts Essentials

You're reading from  Sencha Charts Essentials

Product type Book
Published in May 2015
Publisher
ISBN-13 9781785289767
Pages 214 pages
Edition 1st Edition
Languages
Author (1):
Ajit Kumar Ajit Kumar
Profile icon Ajit Kumar

Google Charts


Google Charts is a data visualization library from Google. It renders charts using SVG and VML (for older IE versions), and offers cross-platform portability to iPhones, iPads, and Android.

Let's follow these steps to create the desired chart using Google Charts:

  1. Create the ch09/GoogleCharts folder.

  2. Create the index.html file and save the following code in it:

    <html>
      <head>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    
        <script type="text/javascript" src="app.js"></script>
      </head>
    
      <body>
        <div id="chartdiv" style="width:600; height:500"></div>
      </body>
    </html>
  3. Create the app.js file and save the following code in it:

    google.load('visualization', '1.0', {'packages':['corechart']});
    
    // Set a callback to run when the Google Visualization API is loaded.
    google.setOnLoadCallback(drawChart);
    
    function drawChart() {
    
            var data = new google.visualization.arrayToDataTable...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}