Cannot get large strings to sort properly
Cannot get large strings to sort properly
I have read several posts on how to get sorting to work with large strings, but I still cannot get it to sort properly.
Please see the fiddle below.
Fiddle: https://jsfiddle.net/2y6t5jx0/
This discussion has been closed.
Answers
See this thread for an explanation. Updated test case prefixing leading zeros to make all the strings the same length:
https://jsfiddle.net/rg6aq93n/
Looks like it works.
Kevin
I agree it now sorts, but I cannot have extra zeros in front. In my case, my data does not represent integers or numbers. They are strings. Is there not a way to force it to sort as string?
The leading zeros are added to the
sortoperation as described in the orthogonal data docs. The display is not affected. You can remove thecolumns.renderoption if you don't want the leading zeros.Also note the test case has
typeset tostringto force the column from typenumtostring. See the updated example's console:https://jsfiddle.net/hymt19pn/
Kevin
Kevin,
I believe "type" was what I was looking for. Thank you for helping me so quickly.
Here is my fiddle:
https://jsfiddle.net/81ah3bj2/1/