data = data.map(function(d, i) {
      return {key: new Date(d[0]), values: d[1]};
    });