nivo icon indicating copy to clipboard operation
nivo copied to clipboard

feat(bump): prevent setting active ids when event.preventDefault() is called.

Open tech-meppem opened this issue 2 years ago • 1 comments

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

tech-meppem avatar Jul 19 '22 15:07 tech-meppem

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

codesandbox-ci[bot] avatar Jul 19 '22 15:07 codesandbox-ci[bot]

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.

stale[bot] avatar Oct 18 '22 22:10 stale[bot]

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!

stale[bot] avatar Oct 28 '22 20:10 stale[bot]