title: How to plot time values in Flot Graph
body: <p>I am using <a href="https://github.com/flot/flot/blob/master/API.md" rel="nofollow noreferrer">Flot Graph Api</a> to plot graphs, I want to plot time values in bar charts.</p>
  
  <p>My table look like some thing similar to this</p>
  
  <p><img src="https://i.stack.imgur.com/2x5gO.png" alt="enter image description here"></p>
  
  <p>My X-Axis should be list of Reasons and Y-Axis should be time variables. My Graph should be some thing like this.</p>
  
  <p><img src="https://i.stack.imgur.com/s40at.png" alt="enter image description here"></p>
  
  <p>but i get something like this, because of the Json object is packed wrongly.</p>
  
  <p><img src="https://i.stack.imgur.com/QljWf.png" alt="enter image description here"></p>
  
  <p>How to plot graph for time values in </p>
  
  <p>My plot JS code is</p>
  
  <pre><code>    &lt;script language="javascript" type="text/javascript"&gt;  
  $(document).ready(function(){
  $.getJSON('ReasonByTime.txt', function(json) {
     //succes - data loaded, now use plot:
         var plotarea = $("#placeholder");
         var dataBar=json.data;
          $.plot(plotarea , [
              {
                  data: dataBar,
                  bars: { show: true},
                  legend: {show: true},
                  yaxis: {
                      mode: 'time',
                      timeformat: "%y/%m/%d",
                          min: ( new Date('2012/01/01') ).getTime(),
                          max: ( new Date('2020/01/01') ).getTime(), 
                          minTickSize: [1, 'hour']
                  }
              }          
          ]
      );
  });
  </code></pre>
  
  <p>});</p>
  
  <p>  </p>
  
  <p>and my current Json object is like this.</p>
  
  <pre><code>  {"data":[[0,5202],[0,19620],[0,82920],[0,240],[0,75720],[0,3060],[0,72840]],"label":"Tea break"}
  </code></pre>
  
  <p>Since i'm new to flot i'm struck up with this work, i did some research but i can't able to solve my problem. Can someone help me out.</p>