DateTimeCategoricalAxis scaling

2 posts, 0 answers
  1. Big G
    Big G avatar
    19 posts
    Member since:
    Jan 2013

    Posted 24 Feb 2014 Link to this post

    I have a lineseries chart and I am using DateTimeCategoricalAxis as the horizontal axis. Is there a way that I can scale the DateTimeCategoricalAxis?

    Here is an example of what I am after.

    I have the following data with the values used for plotting the points.

    Point 1 = 0 Mins - value 5
    Point 2 = 5 Mins - value 10
    Point 3 = 25 Mins - value 10
    Point 4 = 30 Mins - value 5

    Now, if the chart was 100 pixels wide, each would be plotted at 25 pixels apart but that is not to scale. I would prefer something like this

    Point 1 is at 0 pixels
    Point 2 is at 5 pixels
    Points 3 is at 25 pixels
    Point 4 is at 100 pixels

    Hopefully you can see what I am getting at, can this be done?

  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 26 Feb 2014 Link to this post

    Hi Gareth,

    Thank you for the question.

    The DateTimeCategorical axis does not support re-scaling or explicitly specifying the categories positions. I am not sure if I understand your scenario correctly, but could you please take look at the attached image. If this is what you wish your chart to look like, I have also attached the sample project. It uses a DateTimeContinuous axis and since only the minutes DateTime part is displayed, the data point with category 1h 30min goes at the place you wish your last category to be positioned.

    Please, let us know if this helps.

    Regards,
    Rositsa Topchiyska
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
  3. DevCraft banner
Back to Top