This is a migrated thread and some comments may be shown as answers.

Problem with sorting

3 Answers 11 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Siarhei
Top achievements
Rank 1
Siarhei asked on 27 Oct 2015, 02:59 PM

I have problem with sorting line chart. Seems it is happening when not all series contain full list of values on category dimension.

Here is example (because it's hard to explain this in words):

http://dojo.telerik.com/iwizO/6

There in dataSource we have only one point for almost all series besides this one: Niciqa Roq Rduoq - it have 2 values one for January and one for February. So i need all series to be sorted in month order.

In case we have all month's values for each seria - it works well. But there can be scenario if we have such data.

I know that it can be accomplished by generating series manually and by setting chart.series property, but i need it to be done via dataSource.

Could you please help to resolve the issue?

3 Answers, 1 is accepted

Sort by
0
Siarhei
Top achievements
Rank 1
answered on 28 Oct 2015, 07:53 AM

Seems the problem is that is uses only FIRST group to apply sorting. For ex. if i change groupname in the example above to start from 'A' (thus it will put it on the first place after grouping) then sorting will work fine:

http://dojo.telerik.com/iwizO/7

0
Iliana Nikolova
Telerik team
answered on 29 Oct 2015, 03:01 PM
Hi Siarhei,

To achieve the expected I would suggest reversing the categories in the chart DataBound event. For your convenience here is the modified example. 

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Siarhei
Top achievements
Rank 1
answered on 03 Nov 2015, 09:33 AM

Thanks a lot.

I achieved ​desired behavior buy providing full list of data points. Values for these fake data points i set to null. It is acceptable in my scenario

Tags
Charts
Asked by
Siarhei
Top achievements
Rank 1
Answers by
Siarhei
Top achievements
Rank 1
Iliana Nikolova
Telerik team
Share this question
or