I am adding custom text tick labels to my graph (using Figure.update_xaxes(ticktext=[...], tickvals=[...])). However some names are too long to be displayed in its entirety. I wish to truncate such names with an ellipsis, but allow the full name to be shown when a user hovers over the ticklabel.
To complicate things further the custom text are hyperlinks (through setting ticktext with html “<a href='...'>possibly long name</a>”) so the truncate/hover behavior should not interfere with being able to navigate the links.
My current solution is able to link and truncate, but lacks any hovertext. How should I add the hover elements (if possible)?
Hi @pieterg did you take a look at Hover on Axis Tick Label? Since hovering on ticklabels is not supported, you can fake it either using the hover on points, with hovermode='x' (for example
Thanks for the suggestions! Unfortunate it’s going to be hacked in then. For the invisible trace suggestion, is it possible to have it right on the edge of the plot? I found this thread which suggests it’s not possible: Ignore certain traces from auto scale calculation is that the current state?