# Drawing X axis on chart view at zero when negative values exist.

1. ##### Tyler
3 posts
Member since:
Nov 2013

Posted 20 Mar 2014 Link to this post

Hello,

Quick question, as I'm sure there is an easy solution for this, is there anyway to keep the x axis on the chart view at zero when one of the series in the graph contains a negative value? The image I have attached will explain this a bit better. If you look right next to the zero on the y axis, there is a value that goes below zero. What I'm looking for is to have my categorical x axis drawn right at that zero mark and have it look just like what you see in the desired view image. Any info on how to pull this off will be greatly appreciated. Thanks!
2. ##### Tyler
3 posts
Member since:
Nov 2013

Posted 21 Mar 2014 Link to this post

I think a better way to word what i'm saying is I would like to draw the x axis at y=0.

Thanks!
3. ##### Ivan Petrov
701 posts

Posted 25 Mar 2014 Link to this post

Hello Tyler,

Thank you for writing.

To limit the axis value on a LinearAxis you can use the Minimum property. Here is a short example of how to access and set this property:
`LineSeries series = ``new ``LineSeries();`
`this``.radChartView1.Series.Add(series);`
`((LinearAxis)series.VerticalAxis).Minimum = 0d;`

I hope this will be useful. Should you have further questions, I would be glad to help.

Regards,
Ivan Petrov
Telerik

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

4. ##### Tyler
3 posts
Member since:
Nov 2013

Posted 25 Mar 2014 in reply to Ivan Petrov Link to this post

Ivan,

Unfortunately, that's not quite it. When you set the minimum for a series, it literally makes it the minimum value that the series can go. As a result, the negative value that I need to see gets cut off.
The following code produced the attached image..

LineSeries testing = new LineSeries();
((LinearAxis)testing.VerticalAxis).Minimum = 0;

Any other suggestions?
5. ##### Ivan Petrov
701 posts

Posted 28 Mar 2014 Link to this post

Hello Tyler,