plotly / plotly/plotly.py

Axis formatting not carrying over to hover text in shared axes

Aperta
#2,740 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug P3
Lingua principale
Python
Stelle
18.8k
Fork
2.8k
Merge medio
16h 26m
PR unite (30g)
21

Descrizione

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%')

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con la riproduzione Python fornita usando make_subplots, shared_yaxes e update_yaxes, quindi analizza come y-axis tickformat viene applicato ai subplot condivisi e alle etichette al passaggio del mouse. Il lavoro è completato quando i valori al passaggio del mouse del subplot in alto a destra usano in modo coerente il formato percentuale richiesto per l’asse condiviso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.