Line Chart with Negative Values xaxis labels

2 posts, 0 answers
  1. Andy
    Andy avatar
    25 posts
    Member since:
    Aug 2011

    Posted 29 May 2013 Link to this post

    On my line chart with negative values the x-axis labels are under the '0' instead of under the chart.  

    See attached image.

    Is there a way to fix this?

  2. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 30 May 2013 Link to this post

    Hi Andy,

    The RadHtmlChart sets its AxisCrossingValue of the YAxis to 0 by default and that is why the XAxis crosses the YAxis through the 0 point. You can, however, control this behavior through the AxisCrossingValue property of the YAxis, as follows:
    <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="800px" Height="400px">
                        <telerik:SeriesItem YValue="500" />
                        <telerik:SeriesItem YValue="1000" />
                        <telerik:SeriesItem YValue="-500" />
                        <telerik:SeriesItem YValue="-1000" />
                    <telerik:AxisItem LabelText="Item1" />
                    <telerik:AxisItem LabelText="Item2" />
                    <telerik:AxisItem LabelText="Item3" />
                    <telerik:AxisItem LabelText="Item4" />
            <YAxis AxisCrossingValue="-2000">

    You can also find useful the Configuring Axes help article.

    Danail Vasilev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top