Axis formatting not carrying over to hover text in shared axes
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
The code below produces subplots with shared Y axes (on the top row), then attempts to apply y axis formatting to display values in percentages. However, when hovering over the data points in the top right plot, I'm still seeing the default format instead of percentages. Wondering if that's intended, as I feel like the default behavior should be to apply the formatting to all the subplots with that shared axis.
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(rows=2, cols=2,
specs=[[{}, {}],
[{"colspan": 2}, None]],
subplot_titles=("1", "2", "3"),
shared_yaxes=True,
horizontal_spacing=0.01,
vertical_spacing=0.15)
fig.add_trace(go.Scatter(x=[1,2], y=[0,1]),
row=1, col=1)
fig.add_trace(go.Scatter(x=[1,2], y=[0,1]),
row=2, col=1)
fig.add_trace(go.Scatter(x=[1,2], y=[0,1]),
row=1, col=2)
fig.update_yaxes(tickformat=',.1%')
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
Beginne mit der bereitgestellten Python-Reproduktion unter Verwendung von make_subplots, shared_yaxes und update_yaxes, und verfolge dann, wie y-axis tickformat auf gemeinsam genutzte Subplots und Hover-Labels angewendet wird. Als erledigt gilt, dass die Hover-Werte des Subplots oben rechts konsistent die angeforderte Prozentformatierung der gemeinsamen Achse verwenden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100