Smooth line graph can curve outside of the graph boundries

2 posts, 0 answers
  1. NerdBrick
    NerdBrick avatar
    36 posts
    Member since:
    Jan 2013

    Posted 01 Oct 2014 Link to this post


    When the right set of data points present themselves, the smooth curve line will go outside the boundaries of the graph. (see attached image)

    Any best practices to help prevent this?

    Thank you

  2. Stef
    Stef avatar
    3610 posts

    Posted 02 Oct 2014 Link to this post

    Hello Brick,

    This is a known issue already logged in our system for improvement.

    Until there is a fix, you can analyze the data at run-time and set the axis's Scale.Maximum to a value allowing the curve to be drawn without clipping.

    For example:
    //at run time
    var report=new MyReport();
    var graph=report.Items.Find("graph1",true)[0] as Telerik.Reporting.Graph;
    //Assuming you have a single Cartesian coordinate system in your graph.
    var cartesianCoordinateSystem = (Telerik.Reporting.CartesianCoordinateSystem)graph.CoordinateSystems[0];
    //Assuming your Y axis has a numerical scale.
    var numericalScale = (Telerik.Reporting.NumericalScale)cartesianCoordinateSystem.YAxis.Scale;
    numericalScale.Minimum = 1;
    numericalScale.Maximum = GetMaximum()+1000;

    I hope the above information is helpful.


    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