RhoInc/Webcharts

Table: Sort by integer for numeric values

rtbailey opened this issue · 3 comments

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

image

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

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.

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