You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
thanks for this awesome library! I just started playing around with the examples and have the impression that
column sorting doesn't work properly for the slickgrid example.
Sort the fiber(g) column in increasing order works.
Sort the fiber(g) column in decreasing order doesn't work. The selected top data point is clearly not the highes fiber(g) value in the plot.
Any idea what goes wrong?
I would really like to use this example. Any help to fix this would be very welcome.
Thanks
The text was updated successfully, but these errors were encountered:
ibayer
changed the title
Example slickgrid: sorting doens't work properly
Example slickgrid: sorting doesn't work properly
Sep 8, 2016
The results are being sorted as strings, not as numbers. To fix, you could replace the comparer function in the example with
function convert_to_float(x) {
var converted = parseFloat(x);
return isNaN(converted) ? x : converted
}
function comparer(a, b) {
var x = convert_to_float(a[sortcol]), y = convert_to_float(b[sortcol]);
return (x == y ? 0 : (x > y ? 1 : -1));
}
Hi,
thanks for this awesome library! I just started playing around with the examples and have the impression that
column sorting doesn't work properly for the slickgrid example.
Sort the
fiber(g)
column in increasing order works.Sort the
fiber(g)
column in decreasing order doesn't work. The selected top data point is clearly not the highesfiber(g)
value in the plot.Any idea what goes wrong?
I would really like to use this example. Any help to fix this would be very welcome.
Thanks
The text was updated successfully, but these errors were encountered: