plotly / plotly/react-plotly.js

OnBeforeHover returns just an event rather than datapoints and an event

Offen
#259 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
138
Ø Merge
3 T. 2 Std.
Gemergte PRs (30 T.)
4

Beschreibung

The title really says it all. I've attempted to set up an example in codePen (taking my code and boiling it down), however, the older versions didn't even call OnBeforeHover so I tried updating the versions, but I'm not at all familiar with the way in which scripts are loaded in via HTML tags, I think I've done it correctly, however, I have access to neither createPlotlyComponent nor plotComponentFactory in my code.

https://codepen.io/tim-logan/pen/NWgbBvr?editors=1010

I'm attempting to get enough data to make the hover only be active near the line rather than the entire fill, but it's a lot harder if I only have the mouse event.

Oh, and just for clarity, what I get out is NOT

{
  event: mouseEvent,
  points: [] /undefined etc
  ...
}

What I get out is just

event: mouseEvent

(The type definitions claims I should get the first out though)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

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

Reproduziere das OnBeforeHover-Verhalten mithilfe des verlinkten CodePen und untersuche die Typdefinitionen der Komponente, die besagen, dass der Callback sowohl ein Ereignis als auch datapoints enthält. Verfolge, wie der Callback bereitgestellt wird, und bestätige, dass der zurückgegebene Wert neben dem Mausereignis auch die datapoints enthält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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