Get Height of Y-Axis

2 posts, 0 answers
  1. Terry
    Terry avatar
    19 posts
    Member since:
    Feb 2014

    Posted 31 Jul 2014 Link to this post

    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.
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 04 Aug 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top