Time in YAxis (Graph, Winforms)

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Nov 2018

    Posted 14 Nov 2018 Link to this post

    Hi All!

    I want to build a graph with time values:

    YAxis - Numeric (i convert TimeSpan to integer with TimeSpan.TotalSeconds and and use this number in the graph)

    XAxis - Category

    please see the attached screen.

    How i can replace numeric values with Time values? I tried formatting and it does not help. probably need to listen to events, but I could not find an example.

    I really need your help.

  2. Nasko
    Admin
    Nasko avatar
    1085 posts

    Posted 19 Nov 2018 Link to this post

    Hi David,

    The axis scale can be set to Category, Numeric, or DateTime. Unfortunately, there is no TimeSpan option for the scale.
    However, you can still display the current time value above each column using the DataPointLabel property and the TimeSpan.FromSeconds method. You might need to set Visible=True of the DataPointLabelStyle and also get the time in a User Function if it is not already present as a data field.

    Regards,
    Nasko
    Progress Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top