nivo icon indicating copy to clipboard operation
nivo copied to clipboard

Incorrect Ranking with Negative Values in Area Bump Chart

Open thekevinbrown opened this issue 2 years ago • 9 comments

Describe/explain the bug When using the Area Bump Chart, negative values are treated as positive values for the purposes of ranking.

To Reproduce

I created a sandbox here: https://codesandbox.io/s/nivo-line-line-color-442-forked-0zv35u?file=/src/index.js I'd expect company 2 in between company 1 and company 3 in that example.

Here's an example screenshot from our app: Screenshot 2022-12-08 at 6 22 52 pm

The red company goes negative at the end, while the Baseline row is always 0, but Baseline shows below the negative values.

Expected behavior I expected ranking to respect the negative values.

Additional context I can see that the width of the bar is bigger for negative rows. I think that's ok as long as the ranking takes into account the actual values (not the magnitude of the values).

In our use case we're trying to rank companies by Net Profit. Some companies lose money. These should not outrank companies that are breaking even.

thekevinbrown avatar Dec 08 '22 07:12 thekevinbrown

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

stale[bot] avatar Mar 11 '23 12:03 stale[bot]

bump

thekevinbrown avatar Mar 12 '23 06:03 thekevinbrown

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

stale[bot] avatar Jun 10 '23 09:06 stale[bot]

bump

thekevinbrown avatar Jun 13 '23 03:06 thekevinbrown

bump

thekevinbrown avatar Aug 13 '23 10:08 thekevinbrown

bump

thekevinbrown avatar Oct 16 '23 04:10 thekevinbrown

bump

thekevinbrown avatar Feb 20 '24 05:02 thekevinbrown