Sorting on Stacked Charts Changes

5 posts, 1 answers
  1. David
    David avatar
    16 posts
    Member since:
    Aug 2014

    Posted 15 Jul Link to this post

    I created a stacked chart on "Component" with a sort on the "Code" column. With the stacked column the chart sorts correctly on Code with 11 coming before 54. But when I switch to the stacked/grouping mechanism on Component the sorting switches to 54 and then 11. It might be due to something else but all I can think of is the stacked variable took over the sorting. My example is located at http://dojo.telerik.com/@dhighfield/EfuVA/3. I am expecting the Code 11 to always come before 54 since I have sorting set to Code.

    Thank you for your time and assistance as always.

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 19 Jul Link to this post

    Hi David,

    Setting group direction should help to achieve the expected outcome. For your convenience here is the modified dojo.

    Regards,
    Iliana Nikolova
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
  4. David
    David avatar
    16 posts
    Member since:
    Aug 2014

    Posted 19 Jul in reply to Iliana Nikolova Link to this post

    That is setting the group direction. The group direction is changing the x-axis sorting as well as within the group. 11 should always come before 54 since I have sorting set to "Code". Once I set the group as well it changes the sorting to "Component" which is fine within the column but not across all of the columns. The default of "asc" is fine within the column for a grouping but it should not sort amongst columns as well. If I change "Component": "AA" to "Component": "EE" in your example the x-axis columns change back to 54/11 instead of 11/54. The x-axis columns should be governed by the sort: {field: "Code",dir: "asc"} but seems to lose its use when in combination with the grouping property. The x-axis should always be 11/54 no matter the grouping and the grouping sort direction which should only affect the sorting within the column and not across all of the columns since some columns might not have the data being sorted in each column.

     

    Thank you for your time and assistance.

  5. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 21 Jul Link to this post

    Hi David,

    I see what you mean. In order to get this outcome you should sort the categories in the dataBound event. Take a look at the updated dojo and let me know if this fits the current requirements.

    Regards,
    Iliana Nikolova
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  6. David
    David avatar
    16 posts
    Member since:
    Aug 2014

    Posted 21 Jul Link to this post

    Thanks. That's exactly what I was looking for.
Back to Top
Kendo UI is VS 2017 Ready