Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buggy sorting in dataexplorer_table.php #212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

qharscoet
Copy link

Table sorting had errors :

  • Current Live version uses parseInt to sort values so don't sort numbers that have the same integer part
    image

  • At least on today's (03/28) values, had some weird bug : when sorting by ascending weekly growth, Mayotte's -60,5% and St-Pierre-et-Miquelon's -100,0% were somewhere in the middle and seemed to cause some reset in the sorting as further down the values seemed in the correct order. Same thing when changing the order around Moselle's +0,00. Didn't want to debug the custom sorting algorithm so I used javascript's Array.sort() function. Works like a charm and even seems to improve performance.

image

Table sorting had errors : 
- Current Live version uses parseInt to sort values so don't sort numbers that have the same integer part
- At least on today's (03/28) values, had some weird bug : when sorting by ascending weekly growth, mayotte's -60,5% and St-Pierre-et-Miquelon's -100,0% were somewhere in the middle and seemed to cause some reset in the sorting as further down the values seemed in the correct order. Same thing when changing the order around Moselle's +0,00.  Didn't want to debug the custom sorting algorithm so I used javascript's Array.sort() function, works like a charm and even improved performance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant