plotly / plotly/react-plotly.js

OnBeforeHover returns just an event rather than datapoints and an event

Aperta
#259 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.1k
Fork
138
Merge medio
3g 2h
PR unite (30g)
4

Descrizione

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)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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

Riproduci il comportamento di OnBeforeHover usando il CodePen collegato ed esamina le definizioni dei tipi del componente, che indicano che il callback include sia un evento sia datapoints. Traccia il modo in cui il callback viene esposto e conferma che il valore restituito include anche i datapoints, oltre all’evento del mouse.

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

Valutazione

Stack tecnologico
javascript, react
Ambito
data-visualization, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
32/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.