Create google column chart - Javascript Google Chart

Javascript examples for Google Chart:Column Chart

Description

Create google column chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> 
      <script type="text/javascript">
      google.charts.load('current');   
      google.charts.setOnLoadCallback(drawVisualization);
      function drawVisualization() {
        var wrapper = new google.visualization.ChartWrapper({
          chartType: 'ColumnChart',
          dataTable: [['', 'Germany', 'USA', 'Brazil', 'Canada', 'France', 'RU'],
                      ['', 700, 300, 400, 500, 600, 800]],
          options: {'title': 'Countries'},
          containerId: 'vis_div'
        });/*from  w w  w  . java  2  s  .  com*/
        wrapper.draw();
        console.log(wrapper.toJSON());
      }
    
      </script> 
   </head> 
   <body style="font-family: Arial;border: 0 none;"> 
      <div id="vis_div" style="width: 600px; height: 400px;"></div>  
   </body>
</html>

Related Tutorials