hoverlabel formatting in unified mode
See original GitHub issueThe intention for unified hoverlabel formatting is that if layout.hoverlabel
isn’t specified, it will use the settings from layout.legend
for e.g. bgcolor
and font
etc, otherwise it will use the layout.hoverlabel
settings.
Right now it seems like neither work to override the hoverlabel formatting in x unified
mode
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Hover text and formatting in Python
Hover label text and colors default to trace colors in hover modes other than unified , and can be globally set via the...
Read more >Plotly: How to edit unified hoverlabel? - python
Is there a way to 'tune' the menu obtained by editing the traces' names, numbers formats or adding additional informations? What if I...
Read more >Hover Text and Formatting in Python-Plotly
Example 2: x unified. If layout.hovermode='x' , a single hover label appears per trace, for points at the same x value as the...
Read more >How To Change Order Of R Plotly Hover Labels With "X ...
How To Change Order Of R Plotly Hover Labels With "X Unified" Mode ... a single hover label appear, add a different column,...
Read more >25 Controlling tooltips
25.3 Styling. There is currently one main attribute for controlling the style of a tooltip: hoverlabel . With this attribute you can currently...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just be careful re: all the
template
confusion, ideally we can just use thelegend
settings as the defaults for thehoverlabel
settings at the coerce level, rather than interrogating the input layout directly.Now what do you suppose will happen if you provide:
I’m not sure what this should do, but we have similar inheritance scattered all around - and we I do recall we discussed this during the templates push - so it should be handled at the
coerce
level rather than special logic for this case.Oh I meant if e.g.
layout.hoverlabel.bgcolor
isn’t specified in the input, we should fall back tolayout.legend.bgcolor
’s coerced value inunified
hovermode… makes sense?so:
layout: {}
will get us a white hoverlabel,layout: {legend: {bgcolor: 'red}}
will get us a red hoverlabel andlayout: {legend: {bgcolor: 'red}, hoverlabel: {bgcolor: 'blue'}
will get us a blue one. Ditto all the other settings inlayout.hoverlabel
likefont
etc that are in common withlayout.legend
.