Reverse Order

Thread is closed for posting
7 posts, 0 answers
  1. Steve
    Steve avatar
    9 posts
    Member since:
    Jun 2009

    Posted 24 Sep 2012 Link to this post

    I have a chart the need to change the bottom order for a Spline chart I have create.

    <telerik:RadChart
        ID="RadChartDemographic"
        runat="server"
        DefaultType="Spline"
        Skin="Gray"
        ChartTitle-TextBlock-Text="Demographic%">
        <Series>
            <telerik:ChartSeries DataYColumn="Minority" Name="Minority" Type="Spline">
                <Appearance>
                    <FillStyle MainColor="0, 116, 119" />
                </Appearance>
            </telerik:ChartSeries>
            <telerik:ChartSeries DataYColumn="White" Name="White" Type="Spline">
                <Appearance>
                    <FillStyle MainColor="195, 167, 10" />
                </Appearance>
            </telerik:ChartSeries>
        </Series>
    </telerik:RadChart>


    For example:

    1 |
    2 |
    3 |          -   -   - 
    4 |       /             \
    5 |     /                 \
        ----------------------------------
             1           2            3

    I need to change the bottom number order to 3, 2, 1. I have reorder my query, but the numbers stay the same on the bottom. The confusing thing is that the data points in the graph change and do not correlate to the bottom row...

    TIA
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Sep 2012 Link to this post

    Hi Steve,

    One suggestion is that you can reverse the data before passing it on to the chart control as follows. 

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
      int[] array1 = new int[] { 1, 3, 5, 7, 9 };
      Array.Reverse(array1);
      RadChart1.DataSource = array1;
      RadChart1.DataBind();
    }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    9 posts
    Member since:
    Jun 2009

    Posted 25 Sep 2012 Link to this post

    Thanks Princy,

    I have tried this. I have a Linq query and using "orderby x ascending". the lines are basically mirror images, however the bottom number are not changing???

    Thanks again,

    Steve
  5. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 25 Sep 2012 Link to this post

    Steve,

    Unfortunately, RadChart  for ASP.NET AJAX does not provide a setting to enable an inverse axis, as does the RadChart for Silverlight, documented here.

    If you have not already referenced this thread, I'd suggest you do so:

    Change the left axis to descending order

    Telerik Admin: Evgenia has provided a project demonstrating an approach to create an inverse Axis, and shows how to suppress negative values.

    I hope this helps.

    Cheers,
  6. Steve
    Steve avatar
    9 posts
    Member since:
    Jun 2009

    Posted 25 Sep 2012 Link to this post

    This flipped the data upside down. I also tried the X and Y values.

    Here is what I am looking to do:

    1 |
    2 |
    3 |          -   -   - 
    4 |       /             \
    5 |     /                 \
        ----------------------------------
             1           2            3

    Should be

    1 |
    2 |
    3 |                   -   -   - 
    4 |                /             \
    5 |              /                 \
        ----------------------------------
             3           2            1

    Please note that the data is right, but the "3,2,1" values are not being displayed as I require them.
  7. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 27 Sep 2012 Link to this post

    Hello Steve,

     Unfortunately as Richard said, there is no built-in inverse axis functionality with RadChart for ASP.NET AJAX. Since the workaround provided in the forum thread is not applicable for you, the onliest thing I can suggest is that you use the Silverlight RadChart with Inverse Yaxis as shown here.
    You can integrate the SL chart in your website the same way we did in this demo with source code provided. Please check the demos' description where more resources of the approach used are provided.

    Kind regards,
    Evgenia
    the Telerik team

    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.
  8. Steve
    Steve avatar
    9 posts
    Member since:
    Jun 2009

    Posted 27 Sep 2012 Link to this post

    Thanks Evgenia,

    One question? Could one declarative set the bottom row? I can get the data to display the way we want, but the bottom numbers are the only issue.

    I will look into the Silverlight control...

    Thanks,

    Steve
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017