esnet / esnet/react-timeseries-charts

onMouseNear with multiple ScatterPlots

Open
#290 2 comments 1 reaction 0 assignees View on GitHub
:question: question
Dominant language
JavaScript
Stars
876
Forks
279
PR merge metrics
No merged PRs in 30d

Description

This may not be a bug, but I figured it's worth bringing up just in case. When using onMouseNear with multiple scatter plot charts in the same chart container, I find that only a single scatter plot will emit the event.

My current solution might be to move all of the data into a single scatterplot, although this isn't super desirable. Do you have any insight or something that could be missing to make this possible? My code is essentially:

```



{
this.renderCharts()
}

renderCharts() {
const { seriesContainer } = this.props

const charts = Object.keys(seriesContainer).map((serverId) => {
const series = seriesContainer[serverId]

return [
/*,*/
,
]
})

if (this.state.tracker) {
charts.push(this.renderMarker())
}

return charts
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the onMouseNear handling for multiple ScatterChart components rendered by renderCharts, using the provided ChartRow and Charts example to reproduce the behavior. Determine why only one scatter plot emits the event, then verify that each rendered scatter plot can emit it independently.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.