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

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

1 Answer 137 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
A.M
Top achievements
Rank 1
A.M asked on 26 Oct 2012, 04:46 PM
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>

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Marchev
Telerik team
answered on 30 Oct 2012, 09:55 AM
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.

Tags
ChartView
Asked by
A.M
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or