Closed onionhammer closed 3 years ago
Not currently in the pipeline for me, but I'd be happy to review PRs adding these features!
@wyze thanks, any estimate on the level of effort for someone coming in from this cold to add support for these features?
I'll consider digging into it when I get time if it's small enough
Should be pretty straight forward. Funnel is using the layers API, so you can add a new layer for the legends, and it needs an array based on the parts
data, Array<{ id, color, label }>. Pass that to the BoxLegendSvg. You would do this in the useFunnel
hook and return it. See the sankey example: https://github.com/plouc/nivo/blob/master/packages/sankey/src/hooks.js#L153-L161
Then for the tooltip, you have the Funnel accept a new prop of tooltip
and default it to the PartTooltip
component. Then pass that tooltip
prop all the way into here: https://github.com/plouc/nivo/blob/master/packages/funnel/src/hooks.js#L179 and https://github.com/plouc/nivo/blob/master/packages/funnel/src/hooks.js#L190
@wyze thanks for advising on this. Hopefully someone else can pick it up, my client says they'd rather stick with the current use of a horizontal bar chart than have me spend time implementing these features so we can use this funnel chart.
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!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
It seems like tooltip support has come in some way, but for some reason while I see them with 0.74.0 on codesandbox, the same code in my app does not display tooltips;
Codesandbox https://codesandbox.io/s/boring-cdn-ncidj?file=/src/App.js
My App
"@nivo/bar": "^0.74.0",
"@nivo/core": "^0.74.0",
"@nivo/funnel": "^0.74.0",
"@nivo/line": "^0.74.0",
"@nivo/pie": "^0.74.0",
Version:
Code:
Even with the same data.. is there some attribute missing that 'turns on' tooltips?
Upgrading to 0.76 appears to have resolved this - although no option for customizing tooltips still
The new funnel chart is great! However, before I can replace my Bars with it, I'm wondering if some feature parity is on the way, namely: are Legends and custom tooltips coming to Funnel?
Thanks!