Dynamic DateTime Axis BaseUnit

4 posts, 0 answers
  1. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 05 Jan Link to this post

    Hello,

    I'm considering to switch from SSRS to Telerik Reporting and I'm testing Clustered Column chart. As datasource I have simple table as this:

    BillDate (Date), BillAmount (Money)

     On X axis I have BillDate and I'm showing Sum(BillAmount) as data.

     I set Label step to 7, LabelUnit Days, BaseUnit Auto. It works great for daterange of one or two months, each day has own column of data, label is for seventh column. But When user choses great range for this report, for example from 2015-01-01 to 2015-12-31 then there is too much data, labels ale unreadable. Is it possible to set automatic switch to Month BaseUnit or even Year BaseUnit when there is too much records? Attached are samples of both graphs.

     

  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 07 Jan Link to this post

    Hello beavisCZ,

    It is possible to bind the Scale.BaseUnit to a different base unit depending on the number of data records returned from the Graph's data source. This can be done with a Binding and a User Function applied to the coordinate system.

    Attached you can find a sample report demonstrating the approach.

    Regards,
    Nasko
    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
  3. DevCraft banner
  4. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 13 Jan in reply to Nasko Link to this post

    Is it possible to achieve desired result in standalone designer without C# coding? I need distribute reports as standalone files so I dont want use VisualStudio to generate reports as classes.
  5. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 15 Jan Link to this post

    Hello beavisCZ,

    It is possible. In this case you will need to bind the BaseUnit property to a string representation of the DateTimeScaleUnits Enumeration value e.g.:

    = "Days"

    or

    = "Months" 

    or a similar expression which returns the desired string representation of the base unit.

    Regards,
    Nasko
    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