RadViewChart always has 0 on y-axis when the values are negative, even when they are not near 0

2 posts, 1 answers
  1. A.M
    A.M avatar
    1 posts
    Member since:
    Oct 2012

    Posted 26 Oct 2012 Link to this post

    I'm doing a RadCartesianChart with a ScatterLineSeries. When the y-values are negative, the chart always extends the vertical axis all the way from 0, even if the y-values are nowhere near 0. Say, for instance, if the y-values only vary between -10 and -11: The graph displays the area between 0 and -12 so that there is a large empty area above the line and my graph comes out quite flat. Losing a lot of the information that could have been expressed. I attach an example in a jpg.

    The behaviour I would like, and that I think would make sense, is that the y-axis extends just around the values in my dataset. This is what happens for positive y-values, I can't see why there is it's different for negative values.

    I have tried using RangeExtendDirection="None" and Minimum="{x:Static System:Double.NegativeInfinity}" Maximum="{x:Static System:Double.PositiveInfinity}" on the telerik:LinearAxis elements, neither make any difference.

    Is there any way to fix this? I attach a simplified version of my graph xaml below. 


            <telerik:RadCartesianChart Name="LineChart">
                    <telerik:LinearAxis />
                    <telerik:LinearAxis />
                    <telerik:ScatterLineSeries Name="Series" ItemsSource ="{Binding}"/>
  2. Answer
    Petar Marchev
    Petar Marchev avatar
    1014 posts

    Posted 30 Oct 2012 Link to this post


    Thank you for the attached code snippets and image. I was able to create a new project based on your description and code. I can confirm that this behavior is present. I have logged this as a bug in our PITS where you can vote and track its status. I have also updated your Telerik points as a small sign of gratitude for bringing this issue to our attention and helping us improve our products!

    Currently I can only suggest you set a Minimum and Maximum to the horizontal axis (say -112, -110).

    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top