Combo Chart Example

An example of a Google Combo Chart.

by abdullah_swgapps

HTML

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
       <div id="chart_div" style="width: 900px; height: 500px;"></div>

JavaScript

google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawVisualization);

      function drawVisualization() {
        // Some raw data (not necessarily accurate)
        var data = google.visualization.arrayToDataTable([
      ['Mon', 20, 28, 38, 45, 50],
      ['Tue', 31, 38, 55, 66, 70],
      ['Wed', 50, 55, 77, 80, 90],
      ['Thu', 77, 55, 77, 80, 90],
      ['Fri', 68, 55, 77, 80, 90]
      // Treat first row as data as well.
    ], true);

        var options = {
          title : 'Monthly Coffee Production by Country',
          vAxis: {title: 'Cups'},
          hAxis: {title: 'Month'},
          seriesType: 'candlesticks',
          series: {0: {type: 'bars'}}
        };

        var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }