Timeseries gap filling

Fill in timeseries gaps for stacked area chart in D3

HTML

<!DOCTYPE html> 

<body>

</body>

CSS

body {
  font: 10px sans-serif;
}

.axis path, .axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

JavaScript

var margin = {top: 20, right: 30, bottom: 30, left: 40},
    width = 960 - margin.left - margin.right,
    height = 500 - margin.top - margin.bottom;


var myData =  [
  {
    station_id:'Station_1',
    inventory:37,
    date:'2012-05-01 00:00:00'
  },
  {
    station_id:'Station_2',
    inventory:32,
    date:'2012-05-01 00:00:00'
  },
  {
    station_id:'Station_3',
    inventory:36,
    date:'2012-05-01 00:00:00'
  },
  {
    station_id:'Station_4',
    inventory:31,
    date:'2012-05-01 00:00:00'
  },
  {
    station_id:'Station_1',
    inventory:36,
    date:'2012-05-01 04:30:00'
  },
  {
    station_id:'Station_2',
    inventory:29,
    date:'2012-05-01 04:00:00'
  },
  {
    station_id:'Station_3',
    inventory:30,
    date:'2012-05-01 04:45:00'
  },
  {
    station_id:'Station_4',
    inventory:28,
    date:'2012-05-01 04:00:00'
  },
  {
    station_id:'Station_1',
    inventory:18,
    date:'2012-05-01 08:08:00'
  },
  {
    station_id:'Station_2',
    inventory:6,
    date:'2012-05-01 08:08:00'
  },
  {
    station_id:'Station_3',
    inventory:10,
    date:'2012-05-01 08:08:00'
  },
  {
    station_id:'Station_4',
    inventory:12,
    date:'2012-05-01 08:08:00'
  },
  {
    station_id:'Station_1',
    inventory:10,
    date:'2012-05-01 12:08:00'
  },
  {
    station_id:'Station_2',
    inventory:12,
    date:'2012-05-01 12:08:00'
  },
  {
    station_id:'Station_3',
    inventory:13,
    date:'2012-05-01 13:08:00'
  },
  {
    station_id:'Station_4',
    inventory:14,
    date:'2012-05-01 12:08:00'
  },
  {
    station_id:'Station_1',
    inventory:32,
    date:'2012-05-01 16:08:00'
  },
  {
    station_id:'Station_2',
    inventory:29,
    date:'2012-05-01 16:08:00'
  },
  {
    station_id:'Station_3',
    inventory:32,
    date:'2012-05-01 16:08:00'
  },
  {
    station_id:'Station_4',
    inventory:28,
    date:'2012-05-01 16:08:00'
  },
  {
    station_id:'Station_1',
    inventory:35,
    date:'2012-05-01 20:08:00'
  },
  {
   ...