This is a migrated thread and some comments may be shown as answers.

Smooth line graph can curve outside of the graph boundries

1 Answer 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
NerdBrick
Top achievements
Rank 1
NerdBrick asked on 01 Oct 2014, 11:25 PM
Hi, 

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

Brick

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 02 Oct 2014, 04:29 PM
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.

Regards,
Stef
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.

 
Tags
General Discussions
Asked by
NerdBrick
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or