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:

Created:

Updated:

Platform:

Replies:

120304 Sep 18,2015 06:14 PM UTC Sep 21,2015 08:55 AM UTC JavaScript 2
loading
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:
[JS]
sender.model.series[0].points = ej.DataManager(sender.model.series[0].points, ej.Query().sortBy("y")).executeLocal();
ScreenShot:
The data from the external datasource is sorted in ascending order


We have attached the sample for your reference
 WebApplication1
Please let us know if you have any concerns
Regards,
Deepaa.

CONFIRMATION

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.

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

;