Extending nivo.rocks sankey diagram functionality
See original GitHub issueI’m using nivo
’s Sankey diagram, and I need to trigger click/mouseover events programmatically.
I assume it shouldn’t be a problem since nivo
is built upon d3
library, which already implements this functionality using the dispatch
method:
https://stackoverflow.com/a/40289334/12099841
But it’s not included in nivo
’s API.
Is it possible to add this functionality manually?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Sankey chart | nivo
Computes a sankey diagram from nodes and links, built on top of d3-sankey. The responsive alternative of this component is ResponsiveSankey .
Read more >Sankey diagrams | Drop-Offs · Discussion #1800 · plouc/nivo
I am looking for a good library for plotting complex sankey diagrams. I came across Nivo's implementation which seems working quite well, ...
Read more >@nivo/sankey examples - CodeSandbox
@nivo/sankey Examples. Learn how to use @nivo/sankey by viewing and forking example apps that make use of @nivo/sankey on CodeSandbox.
Read more >Using Sankey diagrams in Amazon QuickSight
Use Sankey diagrams to show flows from one category to another, or paths from one stage to the next. For example, a Sankey...
Read more >Top 5 @nivo/sankey Code Examples - Snyk
description: ` how to compute label text color, [see dedicated documentation](self:/guides/colors). `, type: 'string | object | Function', required: false, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@realraif, while that’s possible when relying on d3 for the rendering, nivo uses React for rendering and only rely on d3 for computations, which works quite differently, and unless you use refs, you cannot access nodes this way.
Unfortunately, you cannot do this, or you could do it by creating a custom layer and implementing elements by yourself creating refs for everything, but it would be a lot of work.
Ah I see, my fault for the misunderstanding. I’m not sure if it works or not. It definitely would be a challenge to select certain things currently with the DOM structure we render out. Not sure if we would want to modify it for this use case.
/cc @plouc