plotly / plotly/dash

customdata is missing in clickData for Scattergl objects

Offen
#3,196 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P2
Vorherrschende Sprache
Python
Sterne
24.4k
Forks
2.3k
Ø Merge
2 T. 7 Std.
Gemergte PRs (30 T.)
13

Beschreibung

Describe your context
I've made a dash application that presents some data from an SQLite database both in a graph and an AG Grid table. I'm using scattergl to create a figure with scattergl traces. Clicking a point on the scattergl traces fires a dash callback that should highlight the relevant data in the table. The mapping of the data between the figure and the table relies on the customdata variable of the scattergl class, and that the clickData passed by the click event carries with it the customdata data. This has been working until I recently upgraded my environment.

  • replace the result of pip list | grep dash below
  - Installing dash-core-components (2.0.0)
  - Installing dash-html-components (2.0.0)
  - Installing dash-table (5.0.0)
  - Installing dash (2.18.2)
  - Installing dash-bootstrap-components (1.7.1)
  - Installing dash-ag-grid (31.3.0)
  - Installing dash-bootstrap-templates (2.1.0)
  • if frontend related, tell us your Browser, Version and OS

    • Windows 10
    • Edge
    • 133.0.3065.69

Describe the bug

The bug is the same as that described in https://github.com/plotly/dash/issues/2493, except that I'm experiencing this with Scattergl objects (added to a plotly.graph_objs._figure object with add_traces). Note that this worked just fine before I recreated my environment (and updated many of my packages). Unfortunately I don't have the package list of the old environment.

Expected behavior

I expected the data in the customdata variable of the Scattergl trace to be present in the clickData object I receive in my figure callback, just like before I upgraded my environment.

Screenshots of actual behaviour
Firstly showing created Scattergl objects containing data in its customdata variable.
Image
Secondly showing the click_data dict received in my dash callback after clicking a point on the scatter graph, which does not contain 'customdata'.
Image

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem Dash-Figure-Callback und einem Scattergl-Trace mit customdata und reproduziere das fehlende Feld in der gemeldeten Dash-2.18.2-Umgebung. Vergleiche die empfangenen clickData mit den erwarteten Trace-Daten; das Issue ist abgeschlossen, wenn customdata für angeklickte Scattergl-Punkte vorhanden ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.