An Example of a Google Bar Chart

by heennkkee

HTML

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
  <div id="line_top_x"></div>

JavaScript

google.load('visualization', '1.1', {packages: ['line']});
      google.setOnLoadCallback(drawChart);

      function drawChart() {

        var data = new google.visualization.DataTable();
        data.addColumn('datetime', 'Timestamp');
        data.addColumn('number', 'pressure');

        data.addRows([
            [new Date('2015-11-19 18:26:05'),95245],[new Date('2015-11-19 18:19:07'),95186],[new Date('2015-11-19 18:19:06'),95186],[new Date('2015-11-19 18:12:05'),95152],[new Date('2015-11-19 18:05:53'),95151],[new Date('2015-11-19 17:58:04'),95172],[new Date('2015-11-19 17:51:04'),95152],[new Date('2015-11-19 17:44:04'),95141],[new Date('2015-11-19 17:37:04'),95111],[new Date('2015-11-19 17:30:04'),95102],[new Date('2015-11-19 17:26:04'),95112],[new Date('2015-11-19 17:19:05'),95064],[new Date('2015-11-19 17:12:04'),95042],[new Date('2015-11-19 17:05:04'),95027],[new Date('2015-11-19 16:58:04'),95032],[new Date('2015-11-19 16:51:04'),95045],[new Date('2015-11-19 16:44:05'),95042],[new Date('2015-11-19 16:37:05'),95016],[new Date('2015-11-19 16:30:05'),94990],[new Date('2015-11-19 16:26:04'),94995],[new Date('2015-11-19 16:19:04'),94985],[new Date('2015-11-19 16:12:04'),94969],[new Date('2015-11-19 16:05:04'),94955],[new Date('2015-11-19 15:58:04'),94949],[new Date('2015-11-19 14:50:18'),94987]            ]);

        var options = {
                        chart: {
                          title: 'abasingama_a1',
                          subtitle: 'Unit - Pa',
                          pointSize: 30
                        },
                        width: 800,
                        height: 300,
                        vAxis: { minValue: 95450, maxValue: 95550, format:'decimal'},
                        pointSize: 30,
                      };

        var chart = new google.charts.Line(document.getElementById('line_top_x'));
        var formatter = new google.visualization.NumberFormat({pattern:'0.0e00'});
          
        formatter.format(data, 1);

...