d3-flame-graph icon indicating copy to clipboard operation
d3-flame-graph copied to clipboard

expand hover area on small frames

Open spiermar opened this issue 5 years ago • 4 comments

spiermar avatar Aug 06 '19 23:08 spiermar

@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.

rohchakr avatar Apr 21 '20 05:04 rohchakr

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.

spiermar avatar Apr 21 '20 16:04 spiermar

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.

rohchakr avatar Apr 22 '20 11:04 rohchakr

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.

spiermar avatar Apr 23 '20 21:04 spiermar