Customise Google Bar Charts
<p>I currently use the below code to visualise a dataset of locations and times (measured by subtracting two epoch times, ie milliseconds) using Google Charts. However, I wish to give the user the option to view the chart at different scales ie. in milliseconds, seconds or minutes. How can I do this?</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;head&gt;
 &lt;meta charset="utf-8"&gt;
 &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
 &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
 &lt;meta name="HandheldFriendly" content="True"&gt;
 &lt;meta name="MobileOptimized" content="320"&gt;

 &lt;title&gt;Google Graph and CSV&lt;/title&gt;
 &lt;meta name="description" content="test"&gt;

 &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"&gt;&lt;/script&gt;
 &lt;script src="jquery.csv.min.js"&gt;&lt;/script&gt;
 &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt; // load the visualisation API
  google.load('visualization', '1', { packages: ['corechart', 'controls'] });
&lt;/script&gt;

&lt;style&gt;
#main { 
    width: 100%;
    margin: 0 auto;
}
#crt_ertdlyYY    {
    width: 50%px;
    height: 400px;
    float: left;
    display: inline-block;
}

#outsidePie  {
    width: 600px;
    background: #ffffff;
    height: 400px;
    margin-left: 200px;
    display: inline-block;
}
&lt;/style&gt;

&lt;script type="text/javascript"&gt;
function drawVisualization() {
   $.get("bg_extracted_times.csv", function(csvString) {
        var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
        var data = new google.visualization.arrayToDataTable(arrayData);
        var aggData = google.visualization.data.group(
            data,
            [{
                column: 0,
                modifier: function (value) {
                    return value.toLowerCase();
                },
                type: 'string',
                label: 'Location'
            }],
            [{
                column: 1,
                aggregation: google.visualization.data.sum,
                type: 'number',
                label: 'Time (secconds)'
            }]
        );
      var crt_ertdlyYY = new google.visualization.ChartWrapper({
         chartType: 'BarChart',
         containerId: 'crt_ertdlyYY',
         dataTable: aggData,
         options:{
            title: 'Room Occupancy for 20:82:c0:d9:6c:4b',
            titleTextStyle : {color: 'grey', fontSize: 16},
            bar: {groupWidth: "95%"},
            width:600,
            height:600,
            pieStartAngle: 0,
            is3D: true,
            legend:false,
         }
      });
      crt_ertdlyYY.draw();
   });
}
google.setOnLoadCallback(drawVisualization)
&lt;/script&gt;

&lt;div id="main"&gt;
&lt;div id="crt_ertdlyYY"&gt;&lt;/div&gt;
&lt;div id="outsidePie"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I am hoping to create something like <a href="https://i.stack.imgur.com/IJPfW.png" rel="nofollow noreferrer">this</a> where the options are minutes, secconds or millisecconds.</p>