shzlw / poli

An easy-to-use BI server built for SQL lovers. Power data analysis in SQL and gain faster business insights.
https://shzlw.github.io/poli
MIT License
1.97k stars 331 forks source link

Table ordering does not work #74

Closed g-adamante closed 4 years ago

g-adamante commented 4 years ago

Hey! Thanks for the amazing work with Poli. It fits my needs perfectly :)

I'm having some problems ordering tables like this, through:

image

They are never properly ordered when the value is numeric, the only thing that works is alphabetical ordering.

Any thoughts on how to solve this?

Thanks!

shzlw commented 4 years ago

Thanks for using Poli! I guess the issue is probably caused by the data type of table cell always being converted into string and there is no custom sort function added for each column. I will need to take a look.

shzlw commented 4 years ago

In the new patch v0.12.2, I only fixed the number ordering in table. For use cases like $120, because the column type is changed to string after the prefix is added, it will still be sorted in alphabetical order. Additional prefix/postfix configs will need to added later to 1. use the original column type number for sorting 2. render the prefix/postfix + value in display.

g-adamante commented 4 years ago

Cool!! Thanks for the fix.