sorting in line chart with many series

6 posts, 0 answers
  1. Anatoly Chekh
    Anatoly Chekh avatar
    86 posts
    Member since:
    Apr 2010

    Posted 12 Sep 2011 Link to this post

    Hello!

    I need you help.
    I have line chart with many series.
    I use series mappings for chart.
    I want to sort X categories by some series.

    How can I do this correct?

    I try to add sort description for the some series mapping - this series is sorted, but another - isn't sorted. So I have incorrect chart (see attachments)

    Thanks, Anatoly Chekh.
  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 15 Sep 2011 Link to this post

    Hi Anatoly,

    The attachments can't be opened by some unknown reason. Can you please resend them? Also you may review our help topic where Sorting feature is described and demonstrated.
    If you still have problems with using the feature, it will be best if you send us your runnable project so that we can debug it locally and get back to you with our findings.

    Best wishes,
    Evgenia
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. Anatoly Chekh
    Anatoly Chekh avatar
    86 posts
    Member since:
    Apr 2010

    Posted 15 Sep 2011 Link to this post

    Hello!

    I resend attachments.

    I understand that this is not bug - because I sort only one series. And debug is not needed
    Initially categories for the both series were "A", "B", "C", "D"
    When I sort first series - its categories are i.e. "B", "D", "C", "A", but fo the second still "A", "B", "C", "D"
    And chart paint second line from "A" to "B", from "B" to "C", from "C" to "D".
    But I want that second series order will be the same as first series order ("B", "D", "C", "A")

    Thanks, Anatoly.
  4. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 19 Sep 2011 Link to this post

    Hi Anatoly,

    We are still unable to open the attachments. Could you please send them archived in a .zip file for example? Also it is hard for me to imagine what may cause such behavior without your sample code. It will be very helpful for us if you send it too.

    Kind regards,
    Evgenia
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  5. Anatoly Chekh
    Anatoly Chekh avatar
    86 posts
    Member since:
    Apr 2010

    Posted 19 Sep 2011 Link to this post

    Hello!

    Here is links:
    http://pix.am/dnoh.png (initial state)
    http://pix.am/zuOG.png (sort state)

    This behavior is needed in simple case:
    I.e. We have 2 lines: the first - PC's cost and the second mobile phone's cost
    By X We show any categories (i.e. different cities) or even time

    So our customers want to sort chart by some property:
    1) by category
    2) by value of some series (line)

    This will be very convinient to have property for the chart like "Sort series by axis values (or by another series)".
    In this case I can sort first series and then chart sort another series according X Axis

    Thanks, Anatoly Chekh.
  6. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 22 Sep 2011 Link to this post

    Hi Anatoly,

    You have correctly guessed the reason why the line is displayed this way. Unfortunately, there is no mechanism in RadChart which would allow you to sync the series items ordering in the described manner. A possible workaround would be to populate the chart with only one DataSeries (the one being sorted) and then add the second one manually, respecting the items order.


    Best regards,
    Ves
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top