Webcharts icon indicating copy to clipboard operation
Webcharts copied to clipboard

Table: Sort by integer for numeric values

Open rtbailey opened this issue 7 years ago • 3 comments

On the gist, when sorting a numeric column, it appears to sort by treating the numbers as characters not integers:

image

rtbailey avatar Sep 27 '17 19:09 rtbailey

And maybe handle some common date types like %d%b%Y, %m/%d/%Y, %Y-%m-%d, etc.

samussiah avatar Sep 27 '17 19:09 samussiah

Curious how this works in other libraries (like data tables).

I see 2 options to address this off the top of my head:

  • Add an option to specify type to each column (this would work for other types - dates, etc.)
  • Autodetect whether a column is all numeric via regex.

jwildfire avatar Sep 28 '17 02:09 jwildfire

Also, Not a huge deal, but I'm tempted to remove the bug label here, since the current behavior is expected.

jwildfire avatar Sep 28 '17 02:09 jwildfire