Open nicolaskruchten opened 4 years ago
@nicolaskruchten Would be nice with hover text for shapes.
Shapes are nice to utilize for marking/annotation in plots with vertical/horizontal lines. However it would be nice to have hover text, s.t. info is not visible at all times.
Working in WebViz using Dash and plotly. I've been testing some ways to obtain vertical lines with text info, and found the two possible solutions so far:
1) Shapes + annotations (text labels always visible - not optimal):
2) Vertical trace (must add after data, and calculate min and max y-value. Can become slow with many traces? And does not span across y-axis when zooming out):
Agree, this would be great. If we can't have the full "hover" mechanism, what about enabling the HTML title attribute?
I'd like to bring this up as well. It'd be really cool if hover data could be added to vline or hline objects.
I'm not aware there's any issue adding text in shapes these days, it's already a feature.
However hover labels/text for shapes could be nice. Unless I'm using a shape as the wrong solution for overlaying a few bars behind a scatter plot (as bars already have hover texts). I guess not all shape drawing on charts need to rather be data instead of drawing, otherwise why have shapes at all. But the feature set gradient between plotted data and plotted shapes which aren't data ― it sure implies careful decision making.
We don't want layout shapes to be full traces but it would be pretty convenient to be able to add hoverlabels and text to them, for something like object-annotation or to label horizontal lines on plots.