plotly / plotly/react-plotly.js
How can I hide traces from multiple charts at once?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 138
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 4
Description
I know that I can set the visibility of the trace on the chart by the visible property but this only affects the chart that I clicked on. On a page with multiple charts using similarly named traces, how can I toggle the visibility of all the similarly named traces at the same time?
Here was my attempt but this didn't have any affect and only toggled the chart I clicked.
let updatedChartingData = [...this.state.chartingData];
for (let chart of updatedData) {
for (let i = 0; i < chart.tickerEntities.length; i++) {
let trace = chart.tickerEntities[i];
if (trace.name === trace_name) {
if (!trace.visible) {
trace.visible = "legendonly";
}
else if ((typeof trace.visible) === "string") {
trace.visible = true;
}
else {
trace.visible = "legendonly";
}
}
}
}
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
No repository file or test is identified. Start by tracing how chartingData and each trace's visible property are passed to the React charts; done would require a clear, supported way to synchronize visibility for similarly named traces across charts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100