Manual AxisY [DateTime] only showing first tick

3 posts, 0 answers
  1. ssawchenko
    ssawchenko avatar
    11 posts
    Member since:
    May 2010

    Posted 18 May 2010 Link to this post

    Edit: I mean AxisX in my post title... it's been a long day and I'm very tired.

    Nothing but problems I'm afraid - here's my next one.

    I am trying to manually set the range of the AxisX to only show the last <X> minutes of data.  I have done this:
    DateTime StartDate = DateTime.Parse("2010-05-18T06:38:42.914");  
    DateTime EndDate = DateTime.Parse("2010-05-18T10:31:42.00");  
      
    _RadChart.DefaultView.ChartArea.AxisX.AutoRange = false;  
      
    _RadChart.DefaultView.ChartArea.AxisX.MinValue = StartDate.ToOADate();  
    _RadChart.DefaultView.ChartArea.AxisX.MaxValue = EndDate.ToOADate();  
    _RadChart.DefaultView.ChartArea.AxisX.Step = 5;  
    _RadChart.DefaultView.ChartArea.AxisX.LabelStep = 2;  
    _RadChart.DefaultView.ChartArea.AxisX.StepLabelLevelCount = 2;  

    And the resulting graph has only one starting tick.
    See the attached png for the result.

    Is this a bug, or am I missing a setting?
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 21 May 2010 Link to this post

    Hello shayla sawchenko,

    This is not a bug. A value of 1 equals to 1 day in OLE Automation date time. I suggest you use the following formula when calculating steps:

    step = (maxvalue - minvalue) / desired_number_of_steps;

    Greetings,
    Vladimir Milev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. ssawchenko
    ssawchenko avatar
    11 posts
    Member since:
    May 2010

    Posted 25 May 2010 Link to this post

    Thank you very much for the response.  Currently our evaluation has expired, but I believe we are picking up a license soon.  I will try out this solution once we have done so :)
Back to Top