-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
columnLabelable date, wrong order #17
Comments
Unless I am mistaken (I could be mis-remembering), the sorting in the demo application is actually handled by datatables. They have a bunch of configurable options, and whole section in their documentation on sorting. See here for details. Please report back and let us know the solution if you fix it. |
The columnLabels is not part of the data of the datatables.
The objectKeys(columnLabels).sort() is using the "natural order" which is the problem for me. Thanks in advanced! |
The solution: added a sortFunction to my field definition:
And then made some changes to the populateColumnLabelColumnsResults of pivot.js: added a key parameter that has to be added in the method invocation. And then added the first 6 rows and changed the 7th to use sortedKeys.
Now the custom sortFunction gets called when it's defined! |
Great job! Yes, a pull request would be most welcome. Robert Jackson -- twitter: rwjblue On Jul 12, 2013, at 3:41 PM, m4urer [email protected] wrote:
|
This looks good. Once @rjackson gets a chance to look at it we'll merge it in. |
I have a columnLabel with the format 'dd/mm/yyyy' (my country's date format) and the problem is the column order is wrong, since 29th of june (29/06) is "larger" than 1st of July (01/07) number wise.
Is there a way to tell pivot.js that the column value and the sorting value are not the same??
I tried with a pseudoFunction and a displayFunction with no luck. Can this be done?
Thanks!!
The text was updated successfully, but these errors were encountered: