title: Highcharts - Stacked column data series
body: <p>Im working with stacked column using Highcharts. </p>
  
  <p>The data series im constructing is similar to this </p>
  
  <pre><code>series: [{
              name: 'Apples',
              data: [['2014-01-01',5], ['2014-01-02',3], ['2014-01-04',2], ['2014-01-05',7], ['2014-01-06',8]]
          }, {
              name: 'Oranges',
              data: [['2014-01-01',3], ['2014-01-02',7], ['2014-01-04',9], ['2014-01-05',11], ['2014-01-06',19]]
          }, {
              name: 'Grapes',
              data: [['2014-01-01',15], ['2014-01-02',23], ['2014-01-03',12], ['2014-01-05',17], ['2014-01-06',18]]
          }]
  </code></pre>
  
  <p><a href="http://jsfiddle.net/emgq47px/" rel="nofollow noreferrer">http://jsfiddle.net/emgq47px/</a></p>
  
  <p>If you take a closer look at the data, im missing 2014-01-04 data for Apples but instead the data is stacked on 2014-01-03.</p>
  
  <p>One way of solving this would be to prepopulate categories and follow the same order for inserting my y values but that wont be a good way to solve as i may deal with large data sets down the line.</p>
  
  <p>Any tips to head in the right direction is greatly appreciated.</p>
  
  <hr>
  
  <p>UPDATE: </p>
  
  <p>I'm populating my x and y co-ordinates with values from database. Database gives me date in (YYYY-mm-dd) format. So i'm converting that string to epoch time using strtotime function in PHP <code>strtotime($res[0])</code></p>
  
  <p>But then when I populate draw the highchart, i see wrong dates. I checked with online available epoch converters and it looks like conversion is right but i still cant figure out whats wrong here.
  Even the x axis ticks seems to be slightly off.</p>
  
  <p>Many thanks for your suggestions.</p>
  
  <p><a href="http://jsfiddle.net/emgq47px/3/" rel="nofollow noreferrer">http://jsfiddle.net/emgq47px/3/</a></p>
  
  <hr>
  
  <p>RESOLVED:</p>
  
  <p>I had to multiply epoch time with 1000. This works.</p>
  
  <p>Original answer: <a href="https://stackoverflow.com/questions/22107599/highcharts-timeseries-chart-irregular-datetime-interval-on-xaxis">HighCharts - timeseries chart - irregular datetime interval on xAxis</a></p>