Control LabelStep for DateTimeScale

2 posts, 0 answers
  1. Ovidiu
    Ovidiu avatar
    7 posts
    Member since:
    Mar 2013

    Posted 26 May 2014 Link to this post


    I have the following situation:
    - I use ".trdx" reports created with standalone Report Designer in ASP.Net MVC application
    - I have a reserved space for a graph in a report,
    - the report is parametrized to select from a database values within a date range, the size of the range could vary significantly from one week or less to one month, three months or even more.

    Problem is that if my serie is with daily data then I get too many labels that overlaps over each other. I saw that I can configure LabelStep on the scale but that is a static setting. If I increase the LabelStep to have the labels properly displayed for one month then I remain short on labels.

    Ideal solution for my problem would be to have a way to bind LabelStep to a report parameter so I can calculate how big it shall be from outside depending on selected range.
    Another solution would be to have somehow a way to configure a maximum number of labels to be displayed for the XAxis and the LabelStep to be adjusted automatically based on that
    The desperate solution I was considering also was to dinamically modify the ".trdx" XML report before it get loaded by the report viewer, but didn't found a way to intercept a component/interface that would allow me to do that.

    Could you please suggest any option to address this issue?
    Thank you,


  2. Nasko
    Nasko avatar
    944 posts

    Posted 29 May 2014 Link to this post

    Hello Vasile,

    Thank you for contacting Telerik Support.

    Unfortunately, the LabelStep property does not support expressions and it cannot be bound to a report parameter.
    The only way to set this property is programmatically, before the report is processed. If you have data for the selected date range before the report is shown in the report viewer, then you can modify the report definition and change the LabelStep accordingly.
    In case you use the HTML5 Report Viewer, you need to create a custom report resolver, which will allow you to deserialize the .trdx report to a report object and change its definition.


    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