arthurdejong/munin-plot

Display legend along with the current cursor

Opened this issue · 2 comments

image

The behavior of our current legend display is that it will show when the cursor moves to the border of different color bars, so the problem is there is no legend display when the cursor is moving in the red region (as shown in the figure). It would be better to show it along with the moving cursor.

Hi @TexDash,

Thanks for the feedback. The hover doesn't work really well with areas. This is limited by the functionality that plotly provides, see https://plotly.com/python/hover-text-and-formatting/

We're using the "closest" mode which seems to calculate closeness to the area max line which is not ideal. Alternatives are "x" which can get cluttered quickly. There is also "x unified" which is clearer but both "x" and "x unified" have problems if there are more than 5 or 6 values because the values will not fit within the box for the hover text and it is limited to the graph borders.

Thanks a lot for the explanation, which seems a little tricky. I think the problem comes from the two modes of our figures, including the common line figure mode and the stacked figure mode. For the line figure, I think it's completely fine to use the "closest" visualization, but for the stacked figure, this mode is not that applicable, maybe the mentioned customizable hover label from the link could help.