We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Sorting a chart

How do I sort chart data so that it lists values in increasing or decreasing order?  I am using an external datasource.

2 Replies

DE David Elies September 18, 2015 06:16 PM UTC

FWIW, I would prefer to sort each series individually

DP Deepaa Pragaasam Syncfusion Team September 21, 2015 08:55 AM UTC

Hi David,
Thanks for contacting Syncfusion Support.
We have analyised your query .At present there is no support to sort the list data.
We have created a workaround sample, where the points are sorted using ej.DataManger based on yvalues in preRender Event.
Please find the code below.
Code Snippet:
sender.model.series[0].points = ej.DataManager(sender.model.series[0].points, ej.Query().sortBy("y")).executeLocal();
The data from the external datasource is sorted in ascending order

We have attached the sample for your reference
Please let us know if you have any concerns

Live Chat Icon For mobile
Up arrow icon