How can I populate the x axis with dates given by from and to?
Essentially, the user enters the date "from" and "to" in my HTML web interface; e.g. 24/08/2011 - 28/08/2011
This will be through HTML text fields whose values ββare caught using jQuery when the user clicks the View Graph button.
I would like to create a spline diagram whose x-axis starts 2 days before the date βfromβ and ends 2 days after the date βbeforeβ.
So, in the above example, the user provides:
from -> 24/08/2011 to -> 28/08/2011
so
x-axis start -> 22/08/2011 x-axis ends -> 30/08/2011
I also want it to display 24 hour intervals as their respective dates. Therefore, the x axis should look something like this:
| | | | | | | | | | | | | |___________________________________________________ | | | | | | | | | 22/08 23/08 24/08 25/08 26/08 27/08 28/08 29/08 30/08
EDIT:
I found the following code:
series: [{ type: 'spline', name: 'USD to EUR', pointInterval: 24 * 3600 * 10, pointStart: Date.UTC(<?php echo($year); ?>, 0, <?php echo($day);?>), data: [ 0.8446, 0.8445, 0.8444 ] }]
But I just can't understand how HighCharts equates time slots to pieces of data. I know, obviously, that this is due to pointInterval ...
I can guess that 24 * 3600 is the number of seconds per day, but what is * 10? How do I get it to display exactly 24-hour intervals?