ReactTooltip / react-tooltip

React Tooltip Component
https://react-tooltip.com/
MIT License
3.59k stars 528 forks source link

TreeMap - Hover state based on depth #1217

Closed efitzkiwi closed 2 months ago

efitzkiwi commented 2 months ago

I would like to know if it is possible to set a hover state based on depth. For example, I would like the categories in an official demo to have a stroke hover effect when hovered: https://www.amcharts.com/demos/simple-treemap/ Something like: when hovering the blue container, you can see the top left category has a stroke effect image

I have tried to implement depth rules based on

        seriesRef.bullets.push(function (root, _, dataItem) {
            var depth = dataItem.get("depth");

            if (depth == 1) {
                  // todo set stroke for this container?? how
                  // dataItem.component.states.create("hover", {})
            }
        });

But I am unsure/unable to get the sprite/container associated at this depth.

gabrieljablonski commented 2 months ago

Unless I'm misunderstanding what you're asking, your question is not related to ReactTooltip.

You might be looking for https://github.com/amcharts/amcharts5

If your question is actually about ReactTooltip, please elaborate, since it is unclear how it relates to this project.

efitzkiwi commented 2 months ago

Unless I'm misunderstanding what you're asking, your question is not related to ReactTooltip.

You might be looking for https://github.com/amcharts/amcharts5

If your question is actually about ReactTooltip, please elaborate, since it is unclear how it relates to this project.

My apologies, I had too many tabs open and posted on the wrong github.