The median function of D3 requires the array to be sorted. The documentation is not explicit about it (but mentions it for the similar quantile function).
I have attached a screenshot of the bug manifesting with one outlier.
As it is hard to force this bug to appear in the life map, I've also attached a few test cases (run with jest) as well.
@PapaBravo Thanks for the hint about this. The latest version should contain the appropriate changes. So I will close this pull request without merging.
The median function of D3 requires the array to be sorted. The documentation is not explicit about it (but mentions it for the similar quantile function).
I have attached a screenshot of the bug manifesting with one outlier.
As it is hard to force this bug to appear in the life map, I've also attached a few test cases (run with
jest
) as well.