title: Populate Highcharts X-Axis With Dates Given a From And To Date
body: <p>How it is possible to populate the x axis with dates given a 'from' and 'to' date values? </p>
  
  <p>Essentially, the user will enter a "from" and "to" date in my HTML web interface; for example, <code>24/08/2011 - 28/08/2011</code></p>
  
  <p>This will be via HTML textfields whose values are caught using jQuery when a user presses a "View Graph" button.</p>
  
  <p>I would like to create a spline chart whose x-axis starts 2 days before the "from" date and ends 2 days after the "to" date.</p>
  
  <p>So in the example above, user provides:</p>
  
  <pre><code>from -&gt; 24/08/2011
  to   -&gt; 28/08/2011
  </code></pre>
  
  <p>therefore</p>
  
  <pre><code>x-axis start -&gt; 22/08/2011
  x-axis ends  -&gt; 30/08/2011
  </code></pre>
  
  <p>I also want it to have 24 hour intervals displayed as their corresponding dates. The x-axis should therefore look something like this:</p>
  
  <pre><code>|
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |___________________________________________________ 
     |     |     |     |     |     |     |     |     | 
   22/08 23/08 24/08 25/08 26/08 27/08 28/08 29/08 30/08
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I found the following code:</p>
  
  <pre><code>series: [{
           type: 'spline',
           name: 'USD to EUR',
           pointInterval: 24 * 3600 * 10,
           pointStart: Date.UTC(&lt;?php echo($year); ?&gt;, 0, &lt;?php echo($day);?&gt;),
           data: [
              0.8446, 0.8445, 0.8444
       ]
        }]
  </code></pre>
  
  <p>But I just cannot figure out how HighCharts equates time intervals to the parts of data..I know obviously it has to do with pointInterval...</p>
  
  <p>I can guess that 24 * 3600 is the number of seconds in a day but what is the * 10? How do I get it to display exactly 24 hour intervals?</p>