Cannot get large strings to sort properly
Cannot get large strings to sort properly
smelcher
Posts: 45Questions: 13Answers: 0
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/
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
sort
operation as described in the orthogonal data docs. The display is not affected. You can remove thecolumns.render
option if you don't want the leading zeros.Also note the test case has
type
set tostring
to force the column from typenum
tostring
. 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/