Skip to content

Conversation

@iofeii
Copy link
Collaborator

@iofeii iofeii commented May 7, 2025

Overview

This feature is meant to allow users to click on an exisiting topo map and highlight a corresponding ICA trace.

The Current Behavior

  • When users click on a topo map (e.g. ICA002), the associated trace is "highlighted" on the ICA Time Series Plot.
  • Highlighted traces change their color to a shade of yellow which is subject to change so that the original trace color is ultimately preserved.
  • Only one trace is highlighted at a time.
  • Highlighted traces can be unhighlighted by clicking on the corresponding topomap.

image

Improvement

Instead of altering the existing trace, I’d like to implement a system where a duplicate trace is created behind the original. This duplicate trace would either:

  • Use the same color as the original trace but with reduced opacity, or
  • Use a highlight color (e.g., yellow) with lighter styling.

This "background highlight" would only appear when a component is selected (i.e., during a callback), preserving the original trace while visually signaling selection.

This system is based off an existing article: https://community.plotly.com/t/how-to-give-glow-to-scatter-plot/65660/3. It seems to be that the "glowing" traces must be created at the same time as the "marker" traces with the "glowing" traces' opacity set to 0. The callback would trigger the opacity to increase so that the trace is visible.

Important Notes

  • This feature requires Dash version 2.9 or higher to support duplicate callbacks. The requirements file has been updated accordingly.
  • To unhighlight a trace, users must click on a different point on the topo map than the point it was originally. Currently, I have not found a fix for this, but this is also a minor inconvenience rather than an issue.
  • This commit uses the proposed new color palette (seaborn colorblind palette).

@iofeii iofeii linked an issue May 7, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.49%. Comparing base (d835e40) to head (de9db4f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
+ Coverage   83.64%   84.49%   +0.85%     
==========================================
  Files          26       26              
  Lines        1700     1716      +16     
==========================================
+ Hits         1422     1450      +28     
+ Misses        278      266      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@iofeii iofeii closed this May 7, 2025
@iofeii iofeii deleted the 227-new-feature-interactive-ica-trace-highlighting-via-topomap branch May 7, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Feature: Interactive ICA trace highlighting via topomap

2 participants