Scaling a sub-report chart by passed parameter

3 posts, 1 answers
  1. Peadar
    Peadar avatar
    4 posts
    Member since:
    Feb 2014

    Posted 08 Feb Link to this post

    I'm working on a calendar report that uses a daily sub-report for each day of the month.

    The issue I'm running into is that with auto-scaling, each day scales differently based on the data for that day, meaning that the sub-reports are all displayed using different scales, and so don't lend themselves to side-by-side comparison.

    It's impossible to know before run-time what the maximum scale for the entire month will be, so I can't hard set the axis scales either. Is there a way to 'pass in' the required scale to the sub-report along with the other parameters? I tried to put a formula in the CoordinateSystem.YAxis.Scale.Maximum property, but it seems to only accept a hard value and not a formula.

  2. Answer
    Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 09 Feb Link to this post

    Hello Peadar,

    The Maximum property does not support expressions, but you can add a Binding to set this property using an expression.
    The binding should be added to the Graph.CoordinateSystems.Bindings collection. The needed property path is XAxis.Scale.Maximum or YAxis.Scale.Maximum depending on your chart type.

    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. Peadar
    Peadar avatar
    4 posts
    Member since:
    Feb 2014

    Posted 12 Feb Link to this post

    Perfect, thanks! Hadn't worked with bindings before, extremely useful feature!
Back to Top