Label of Category Axe

6 posts, 0 answers
  1. Michele
    Michele avatar
    5 posts
    Member since:
    Jan 2014

    Posted 04 Jun 2014 Link to this post

    I need to draw a Trend Graph with a date time value on the X Axe and a Value on the Y Axe.
    I have many samples (1000) within a short period less (10 minutes) and I'd like to see an entry in the graph at every second.

    DateTime Scale doesn't allow to use seconds so I choose the Category Graph option but I cannot limit the number of labels of the X Axe that will be too much (1000).

    Is there any way to solve my issue either with DateTime Scale or with Category Scale?


    Michele 
  2. Ivan Hristov
    Admin
    Ivan Hristov avatar
    92 posts

    Posted 06 Jun 2014 Link to this post

    Hello Michele,

    We have already answered to your question in support ticket #826279, but we will the answer here as well for anyone concerned.
    We would like to kindly ask you to use just one support channel to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two threads instead of one.

    Thank you for your understanding.

    Now to your question:
    In the upcoming Q2 release of Telerik Reporting we plan to introduce Seconds as the smallest base unit for the DateTime scale. This feature has successfully passed the QA stage and unless some unexpected changes occur, it will be included in the new release, which will be published later this month. As soon as we are ready, we will introduce the new features and improved functionalities on our What's New page, so you can check it occasionally.


    Regards,
    Ivan Hristov
    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.

     
  3. Michele
    Michele avatar
    5 posts
    Member since:
    Jan 2014

    Posted 06 Jun 2014 in reply to Ivan Hristov Link to this post

    Dear Ivan,
    sorry for that but I didn't post the same question in two support channels.

    I did post 2 questions on the forum channel, never used a ticket.

    Moreover the 2 questions are a bit different, on this one I also asked if there is any way to programmatically reduce the number of labels when using a Category scale.

    Best Regards
    Mcihele
  4. Ivan Hristov
    Admin
    Ivan Hristov avatar
    92 posts

    Posted 06 Jun 2014 Link to this post

    Hello Michele,

    I'm sorry for the confusion caused by overlooking the details in the current forum post. However, we would recommend you to use our support system, because its tickets are processed with a higher priority than forum threads.

    We wouldn't recommend you to use the CategoryScale to display a continuous timespan, because your points will not get distributed properly if they are not measured at equal intervals. Also it lacks the LabelStep property, which is present in the Numerical and DateTime scales.

    A better option is to use the NumericalScale and present your seconds data as decimal numbers. You can then create a CalculatedField and use it as a X value of your chart. In this case you will be able to reduce the amount of labels on the axis through the LabelStep property of the NumericalScale.

    If you have further questions, please let us know.

    Regards,
    Ivan Hristov
    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. Michele
    Michele avatar
    5 posts
    Member since:
    Jan 2014

    Posted 06 Jun 2014 in reply to Ivan Hristov Link to this post

    Thanks Ivan,


    I can calculate X Axis values by calculating the amount of seconds from the start of the trend but
    how can I set the Label to show a time with hh:mm:ss ?

    Michele
  6. Ivan Hristov
    Admin
    Ivan Hristov avatar
    92 posts

    Posted 09 Jun 2014 Link to this post

    Hi Michele,

    When using the Numerical Scale, you cannot set a DateTime format on your axis labels, because the presented data is of a numeric type. You can set a custom label expression when you are using a CategoryScale, but, again, this scale does not provide a LabelStep property. Instead, you can write an expression for your CategoryGroup.Label that returns a valid output on every minute and an empty string otherwise.

    Please take a look at the attached .trdx example, which shows how to create a Calculated Field and use it in a line chart. The example also shows how to write the fore-mentioned Label expression so your labels appear on every minute. Although the example uses only static data, it is connected to the AdventureWorks sample database, so you may need to reconfigure the SqlDataSource component according to your MSSQL server settings, attaching it to any MSSQL database you have.

    Hope it helps.

    Regards,
    Ivan Hristov
    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