AddRange of Chart in descending order

Thread is closed for posting
2 posts, 0 answers
  1. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 18 Apr 2014 Link to this post

          I am working in radchart control. i am using addrange property to add X axis item dynamically. I have a requirement to show values in reverse order.  I need an immediate solution.

  2. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 22 Apr 2014 Link to this post

    Hi Dhamodharan,

    You can use the code as follows:

    <telerik:RadChart ID="RadChart1" runat="server" Height="400px" Width="600px" OnBeforeLayout="RadChart1_BeforeLayout">
            <telerik:ChartSeries Type="Point" Name="Series 1">
                    <telerik:ChartSeriesItem YValue="30" XValue="15">
                    <telerik:ChartSeriesItem YValue="10" XValue="20">
                    <telerik:ChartSeriesItem YValue="20" XValue="25">
    protected void Page_Load(object sender, EventArgs e)
        RadChart1.PlotArea.XAxis.AutoScale = false;
        RadChart1.PlotArea.XAxis.AddRange(10, 30, 5);
    protected void RadChart1_BeforeLayout(object sender, EventArgs e)
        int numXAxisLabels = RadChart1.PlotArea.XAxis.Items.Count;
        var axisItems = new ChartAxisItem[numXAxisLabels];
        RadChart1.PlotArea.XAxis.Items.CopyTo(axisItems, 0);
        foreach (var item in axisItems.Reverse())

    Danail Vasilev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top