Setting maximum and Minimum datetime

5 posts, 0 answers
  1. Craig
    Craig avatar
    16 posts
    Member since:
    Jun 2014

    Posted 01 Jul 2014 Link to this post

    I would like to set the Maximum and Minimum values for the DateTime axis for my graph from my datasource. 

    For example i want to display from 01/01/2014  to 02/01/2014.  I currently have those two values in parameters, but how do i set the Maximum and Minimum of the scale to these paramaters?  I have tried =Parameters.Start.Value ect... (Start is my datetime parameter)

    Any suggestions?
  2. Craig
    Craig avatar
    16 posts
    Member since:
    Jun 2014

    Posted 03 Jul 2014 Link to this post

    I have tried out many different ways to approach this, I have been succesffully able to change the maximum and minimum properties through changing the xml attributes of the report dynamically through javascript/c#.  I feel as if there has to be a simplier and more efficient way to change the max and min values on the axis.

    thanks
  3. DevCraft banner
  4. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 04 Jul 2014 Link to this post

    Hello Craig,

    The Scale.Minimum and Scale.Maximum properties of the Graph Axis do not support expressions. You can set static values for these properties, but cannot assign report parameter values.

    A possible approach, as you mentioned, is to determine these values and set them programmatically in the report definition before the report is displayed in the viewer.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Craig
    Craig avatar
    16 posts
    Member since:
    Jun 2014

    Posted 07 Jul 2014 in reply to Nasko Link to this post

    Hello Nasko,

    Thank you for the quick and timely post.  Unfortunately I have discovered that if multiple customers are using the same template and changing the xml properties at different times that there may be a time that two customers open the report up and save it at different times.  This could mess up the scaling for them.

    I came up with another ideal, maybe adding fake events to the maximum and minimum dates so the graph stretches out.  Do you think this is possible?  

    Thanks
  6. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 10 Jul 2014 Link to this post

    Hello Craig,

    We believe the best approach would be to send us a small runnable sample project with dummy data, which demonstrates a similar scenario. We will review it and try to implement a solution to set the required scale minimum and maximum.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner