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

    Hi
    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. 

    Thanks
    A.M



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

    Posted 30 Oct 2012 Link to this post

    Hello,

    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).

    Regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top