Plotly Transform Aggretation: median calculation appears wrong
I have an application that can show the data in box format or aggregate into a scatter. I noticed that some groups were showing different 'median' values.
here is a simple example using the numbers of 6, 28, 33, 37, 49 which is resulting in a median of 37...
See the Pen Plotly.js Transforms median error?
@mwills thanks very much for the report and a minimal example. It appears there is a sorting problem when numbers have different digits! And if I add 100 to that list I get the correct answer | demo.
Heh we’re probably falling into the trap of assuming the default sort function is numeric, but it’s actually string-based. I never did understand that choice...