nivo
nivo copied to clipboard
feat(bump): prevent setting active ids when event.preventDefault() is called.
For bump & area bump graphs, prevent setting the activeSerieIds if you call preventDefault() on the event.
This is useful if you want to only have interactivity (hovering + highlighting) activate for only specific areas / lines, and not all of them.
So, adding something like the following to <Bump /> or <AreaBump /> will no longer cause the other serie data to go inactive, but only for the specific serie you specify.
onMouseEnter={(d, e) => {
if (d.id === `Serie 5`) e.preventDefault();
}}
Example: https://codesandbox.io/s/nivo-forked-g2f5fj?file=/src/charts/Bump.tsx
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 07215d8b175493bd90a558a06a8d5d03025c49c1:
Sandbox | Source |
---|---|
nivo | Configuration |
nivo (forked) | PR |
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.
Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!