plotly / plotly/react-plotly.js
OnBeforeHover returns just an event rather than datapoints and an event
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 1.1k
- Forks
- 138
- Merge médio
- 3d 2h
- PRs com merge (30d)
- 4
Descrição
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)
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza o comportamento de OnBeforeHover usando o CodePen vinculado e inspecione as definições de tipo do componente, que afirmam que o callback inclui tanto um evento quanto datapoints. Rastreie como o callback é exposto e confirme que o valor retornado inclui os datapoints além do evento do mouse.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, react
- Domínio
- data-visualization, frontend
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 32/100