Consider showing UTC offset in tooltip for datetimes
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
Say I have
import pandas as pd
dfa = pd.DataFrame(
{
"datetime": ["2020-10-25T01:30"] * 2,
"price": [40, 50],
}
)
dfa['datetime'] = pd.to_datetime(dfa['datetime']).dt.tz_localize('Europe/London', ambiguous=[True, False])
dfa
datetime price
0 2020-10-25 01:30:00+01:00 40
1 2020-10-25 01:30:00+00:00 50
and I plot
px.scatter(dfa, x="datetime", y="price")
then I get
Notice how the two points are stacked one on top of each other, even though they are actually 1 hour apart
If Plotly's design decision for time zones is to display the local datetime, then I think this makes perfect sense, nice one 👍 However, I think the tooltip should give enough information to distinguish the two points, whereas currently, they both show:
datetime=Oct 25, 2020, 01:30
I would expect the bottom one to show datetime=Oct 25, 2020, 01:30 +01:00 and the top one to show datetime=Oct 25, 2020, 01:30 +00:00
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
Führe zunächst die Python-Reproduktion im Issue aus und untersuche, wie Plotly Datetime-Werte in Hover-Tooltips formatiert. Als erledigt gilt die Aufgabe, wenn die beiden mehrdeutigen Europe/London-Datetime-Werte durch die Anzeige ihrer UTC-Offsets unterscheidbar bleiben und für dieses Beispiel Coverage hinzugefügt wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100