plotly / plotly/react-plotly.js
onSelected event not being called
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 138
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 4
Description
When selecting a region on the <Plot> the onSelected event is not firing. Other events such as onUpdate and onClick work.
Plot Component:
<Plot
onSelected={(data) => this.setTotalData(data)}
layout={layout}
useResizeHandler={true}
style={{ width: "100%", height: "100%" }}
data={data}
/>
Function to be called:
setTotalData = (data) => {
console.log("Selected Data: ", data)
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shown usage and compare the non-working onSelected callback with the onUpdate and onClick events that reportedly work. Reproduce region selection and trace the component's event handling until the callback is invoked; done means selecting a region calls setTotalData with the selected data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100