provide hovermode compare
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
I want hover a position show all data accross vertical line, like :

I found javascript version have this https://github.com/plotly/plotly.js/issues/2155#issuecomment-351393616
But hovermode='compare' got error
ValueError:
Invalid value of type 'builtins.str' received for the 'hovermode' property of layout
Received value: 'compare'
The 'hovermode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['x', 'y', 'closest', False]
PS: I really think bokeh's hovertool is much better than plotly , at least they put all hover relative things in one place with examples , easy to found what you want, simply add mode='vline' would work
HoverTool(
tooltips=[
( 'date', '@date{%F}' ),
( 'close', '$@{adj close}{%0.2f}' ), # use @{ } for field names with spaces
( 'volume', '@volume{0.00 a}' ),
],
formatters={
'date' : 'datetime', # use 'datetime' formatter for 'date' field
'adj close' : 'printf', # use 'printf' formatter for 'adj close' field
# use default 'numeral' formatter for other fields
},
# display a tooltip whenever the cursor is vertically in line with a glyph
mode='vline
')
plotly document contain many things but didn't group well, find a solution is not easy .
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Vergleiche das in issue #2155 referenzierte Verhalten von plotly.js mit den von plotly.py akzeptierten layout hovermode-Werten, beginnend bei der Validierung, die derzeit 'compare' ablehnt. Bestätige das gewünschte vertikale Hover-Verhalten über mehrere traces hinweg und überprüfe, dass der unterstützte Wert die angeforderte Darstellung erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100