I am taking a existing chart that was done previously in Dundas chart control and migrating it to the Telerik chart control. So far I can easily replicate the data area display, but I am having trouble with the labels and gridlines on the x-axis. Basically I need to take a start and end date and always display the grid with 8 total gridlines (9 if you include the Y axis) based on hours. So for example in the attached files I have one with a start date of 2/23/2011 and end date of 3/1/2011. I need that range basically as best as possible divided by 8. This needs to happen even if dealing with just a single day as seen in the attached file for just 2/23/2011. With my old Dundas code I did this by taking the total hour difference between the dates, loop adding an hour to the value until it was divisble by 8 evenly and then setting the X axis to that as the intervale and telling the grid its X axis was an intervaltype of hours. Here is the code.
Now I realize that the Telerik chart works differently so I have tried many things to replicate the same process in its workings. I set the Label step to 8. I set ranges, etc. No matter what I do I cannot get it to display 8 grid lines. I just get labels for the start and end dates. I tried code like below to no avail. I am think I am missing something in my understanding on how the labels and grid lines work. Side note. I need the labels to be on the grid lines. Thanks in advance.