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

Get Height of Y-Axis

1 Answer 84 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 31 Jul 2014, 06:42 PM
I am using the CartesianCustomLineAnnotation to set the VerticalTo property. I would like the vertical line to extend the entire height of the chart from 0 all the way to the top. Since I am generating the chart using data from a database query I can not know the scale of the y-axis. Sometimes it is 0-100, other times it can be in the millions. The chart does a good job of adjusting the Y-axis labels to display data to scale, but since I am hard-coding the LineAnnotation, sometimes the VerticalTo is lower than the actual height of the Y-axis.

Is there a simple way to set the height of the line annotation so it always goes to the top without hard-coding a really large number? The properties off of VerticalAxis do not seem to help.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 04 Aug 2014, 07:30 AM
Hello Terry,

I am unsure what is the desired output you are after. Perhaps you need a line that is always parallel to the vertical axis? If this is the case, the CartesianGridLineAnnotation is a better fit, as it does this by itself.

If this is not what you are looking for, I will ask that you provide us with a couple of snapshots demonstrating the desired visual presentation for the custom line annotation, so that we know how to help. Perhaps you can attach an event handler to the DataBindingComplete event of the series and use some custom code there. The solution might depend on the actual results you require. Send us a couple of snapshots (drawings of some sort) so that we can resolve this as quickly as possible.
 
Regards,
Petar Marchev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ChartView
Asked by
Terry
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or