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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sorting a chart

Thread ID:





120304 Sep 18,2015 06:14 PM UTC Sep 21,2015 08:55 AM UTC JavaScript 2
Tags: ejChart
David Elies
Asked On September 18, 2015 06:14 PM UTC

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

David Elies
Replied On September 18, 2015 06:16 PM UTC

FWIW, I would prefer to sort each series individually

Deepaa Pragaasam [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon