View jumps when zooming line graph
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 am experiencing the same problem described in this issue for Plotly.js.
In my python implementation, the line graph is so configured:
{
"xaxis": dict(
gridcolor="rgba(128, 128, 128, 0.2)",
zerolinecolor="rgba(128, 128, 128, 0.2)",
showgrid=True,
type="date",
tickformatstops=(
[dict(dtickrange=[None, None], value="%a %d %b %y - %H:%M")]
),
),
"yaxis": dict(
gridcolor="rgba(128, 128, 128, 0.2)",
zerolinecolor="rgba(128, 128, 128, 0.2)",
showgrid=True,
),
"spikedistance": -1,
"xaxis_showspikes": True,
"yaxis_showspikes": True,
"xaxis_spikemode": "across",
"yaxis_spikemode": "across",
"xaxis_spikecolor": "rgba(255,255,255,0.5)",
"yaxis_spikecolor": "rgba(255,255,255,0.5)",
"xaxis_spikethickness": 1,
"yaxis_spikethickness": 1,
}
The problem seems to surface when the tick text is long enough and when zooming will cause the tick text to end up at a particular distance from the edge of the line graph. I notice it happens more often when the tick text overflows following a zoom and will be subsequently hidden.
The issue won't occur if I do:
tickformatstops=(
[dict(dtickrange=[None, None], value="%H:%M")]`
),
Because the resulting tick text won't be long enough.
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 damit, das Zoomverhalten mit der im Issue gezeigten Python-Konfiguration und den langen Beschriftungen der Datums-Ticks zu reproduzieren, und vergleiche es dann mit Plotly.js issue 7438. Prüfe, ob der Sprung auftritt, wenn überlaufender Tick-Text nach dem Zoomen ausgeblendet wird. Als erledigt gilt die Aufgabe, wenn der Graph mit langen Tick-Beschriftungen nicht mehr springt, während das kürzere Format %H:%M weiterhin unbeeinträchtigt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, python
- Bereich
- data-visualization, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100