Legend order

5 posts, 0 answers
  1. David
    David avatar
    301 posts
    Member since:
    Mar 2014

    Posted 29 Sep 2017 Link to this post

    Legend order is reversed for some reason (see attached)

    Any suggestions

  2. Vessy
    Admin
    Vessy avatar
    2212 posts

    Posted 02 Oct 2017 Link to this post

    Hi David,

    The sereis names shown in the chart's legend are listed in the same order in which they are set in the chart. You can see this behavior demonstrated here here:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/stacked-series

    If you want to order the items in the legend differently, you will simply need to change their order in the markup.

    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. David
    David avatar
    301 posts
    Member since:
    Mar 2014

    Posted 02 Oct 2017 in reply to Vessy Link to this post

    Hi Vessy,

       It seems to me that if item is on top in chart it should be on top in legend.

       Can you elaborate please on "If you want to order the items in the legend differently, you will simply need to change their order in the markup". I set up my items in code behind, not in the markup

    Thank you

    David

  4. Vessy
    Admin
    Vessy avatar
    2212 posts

    Posted 02 Oct 2017 Link to this post

    Hi David,

    I am afraid that with the current implementation of the chart, the first series is rendered on the bottom of the column stack (first in stack) and on the top of the legend (firs in legend). Theire is an already logged feature request for adding ability to reverse the legend, so you can vote on its implementation here:
    https://feedback.telerik.com/Project/108/Feedback/Details/140318

    In the item above you can also see a way to reverse the legend through the Kendo widget of the control, namely:
    <script>
    function OnLoad(sender, args) {
        var kendoWidget = $find('<%=RadHtmlChart1.ClientID%>').get_kendoWidget();
        kendoWidget.options.legend.reverse = true;
        kendoWidget.redraw();
    }
    </script>
    <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="600" Height="400">
        <ClientEvents OnLoad="OnLoad" />
        ...
    </telerik:RadHtmlChart>


    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. David
    David avatar
    301 posts
    Member since:
    Mar 2014

    Posted 02 Oct 2017 in reply to Vessy Link to this post

    Understood

    Thank you

Back to Top