Ordered date being reordered

Anonymous avatarAnonymous created an issue


Great work with the jqplot.

I have an issue, where the data is being reorded by the x axis values.

The data I am plotting is ordered by the y axis values and I pass it to jqplot as such.

Ploting just the points is fine, however the lines don't come out right.

The line code: " sortData(this.series); " is the problem in "this.init = function...".

Its easy for me to remove the line of code, but it may be better served as an option parameter to sort by x, or y values or no sorting, with no sorting being the default.

I'm thinking many people may be passing values from a database jqplot that are already sorted.

Of course this may have implications for some other aspects of the library such as trend lines.


Comments (3)

  1. Chris Leonello

    Yes, a lot of things can break if the data isn't increasing in x (or y for a horizontally oriented bar chart).

    What type of plot are you making? What does your data look like? Do you have an example? Just curious what your plot looks like.

    In any case, I added an option to turn off sorting, It'll be in the next release.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.