vector-engineering / covidcg

A COVID-19 CoV Genetics (CG) browser to inform therapeutics development
https://covidcg.org
MIT License
26 stars 5 forks source link

GroupStack plot – shift-click to select multiple groups #402

Open atc3 opened 3 years ago

atc3 commented 3 years ago

Allow range selection from our GroupStack plot

Basic workflow for this:

  1. Capture shift-click events and bubble them up to React to handle
  2. Since Vega (and not React) determines the order of groups, we'll have to grab this from Vega before further processing. See src/components/Vega/SurveillancePlot.js for an example of extracting data from Vega plots into React
  3. Create the range selection from the ordered list of groups. The group that was just shift-clicked on is the end of the range, and the previously selected group is the beginning of the range. If no groups are already selected, then only select the one group that was shift-clicked (The range starts and ends at the same group). If multiple groups were already selected, then start the range at the most recently selected lineage (should be the last element in configStore.selectedGroups).