d3-flame-graph
d3-flame-graph copied to clipboard
expand hover area on small frames
@spiermar I would like to work for this issue. Please assign this to me.
I am thinking of having a min width (if the width of any frame is smaller than this, then upon hover, its width should be set to this value). Also, would be good to have a frame border or fade effect upon hovering - this behaviour to be consistent for all frames (small and big ones).
Please share your opinion and suggest.
This is a tricky one. Not even sure how a large hover area would work. The issue is that is impossible to read very small frames since the size of the frame is too small to hover. Having a min is not ideal since it would distort the flame graph and possibly lead to wrong assumptions during analysis. I have a minWidth option, but what it does is hiding anything smaller than that.
I see some of the small frames keep appearing as we traverse above the stack (zoom in). They are not visible once we reset zoom and go down to the previous stack level.
Provided that the content width/height remains fixed, we may not make the small frames appear. But whatever frames are visible at a particular zoom level, some styling can be applied on hover to make them focussed and stand out from the rest.
The min size is px based, so when you zoom in, they become visible. I wouldn't worry about the non-visible frames, but the hover of visible ones.