X-Axis label values round

4 posts, 0 answers
  1. Gabriel
    Gabriel avatar
    12 posts
    Member since:
    Aug 2012

    Posted 03 Jul 2013 Link to this post


    Hi, anyone knows how to round the numbers on an x axis, I have values like 2, 3  4 and my a axis has 0 0.5, 1, 1.5 , 2, 2.5 etc

    how do I only show 1, 2 3 4 5 etc? and hide 0.5, 1.5, 2.5

    These are products sales, I cant show halves ...

    thanks.

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 04 Jul 2013 Link to this post

    Hello Gabriel,

    You can use the Step property of the Axes, in order to set the interval of the axes labels. For example:
    <telerik:RadHtmlChart runat="server" ID="ColumnChart" Width="800" Height="500" Transitions="true"
        Skin="Forest">
        <PlotArea>
            <XAxis Step="1">
            </XAxis>
            <YAxis Step="1">
            </YAxis>
            <Series>
                <telerik:ScatterLineSeries>
                    <SeriesItems>
                        <telerik:ScatterSeriesItem Y="0.5" X="0.5"></telerik:ScatterSeriesItem>
                        <telerik:ScatterSeriesItem Y="2.5" X="2.5"></telerik:ScatterSeriesItem>
                        <telerik:ScatterSeriesItem Y="3.5" X="3.5"></telerik:ScatterSeriesItem>
                    </SeriesItems>
                </telerik:ScatterLineSeries>
            </Series>
        </PlotArea>
    </telerik:RadHtmlChart>

    You can also find useful the Configuring Axes help article.

    Regards,
    Danail Vasilev
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gabriel
    Gabriel avatar
    12 posts
    Member since:
    Aug 2012

    Posted 08 Jul 2013 Link to this post


    thanks, that did work for small values, when the values exceed 20 the axis labels become very cluttered, I will deal with that progrmatically then, thanks for the tip though, it was what I missed ,,, :D


  5. Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 11 Jul 2013 Link to this post

    H Gabrieli,

    I am glad to hear that you have successfully applied our suggestion. You should also know that we have planned to introduce (n our next major release) Step and Skip properties which will resolve the issue with cluttered labels

    Regards,
    Stamo Gochev
    Telerik
    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 the blog feed now.
Back to Top