title: how to set max min on highcharts dynamically
body: <p>I'm trying to set the xAxis in highcharts to have the max equal today's date and the min equal to 7 days prior. So it will always show 7 dates even if there isn't a data point for a given date.</p>
  
  <p>The data is displaying correctly, just the min and max break it.</p>
  
  <p>here's the script - <a href="http://jsfiddle.net/Jv82q/1/" rel="nofollow">http://jsfiddle.net/Jv82q/1/</a> - notice line 3 is commented out, when uncommented it breaks the chart. Not sure why.</p>
  
  <pre><code> var max = new Date().getTime();
  var min = new Date().getTime();
  // min.setDate(min.getDate()-7);
  $(function () { 
  $('#container').highcharts({
      chart: {
          type: 'areaspline'
      },
      title: {
          text: 'Weight History'
      },
      credits: {
          enabled: false
      },
      xAxis: {
          type: 'datetime',
          dateTimeLabelFormats: {
              day: '%e %b'
          },
          min: min,
          max: max
      },
      yAxis: {
          title: {
              text: 'Weight'
          },
          min: 20,
          max: 400
      },
      series: [{
          name: 'Daily Weigh In',
          color: '#7ec152',
          data: [[Date.UTC(2014,  3, 13), 400],[Date.UTC(2014,  3, 14), 300],[Date.UTC(2014,  3, 15), 300],[Date.UTC(2014,  3, 16), 300],[Date.UTC(2014,  3, 18), 300],[Date.UTC(2014,  3, 19), 300],[Date.UTC(2014,  3, 20), 300]        ]
      }]
  });
  });
  </code></pre>