Skip to content

811: multicolor node support - #1720

Open
glstott wants to merge 19 commits into
CDCgov:devfrom
glstott:811-multicolor-nodes
Open

811: multicolor node support#1720
glstott wants to merge 19 commits into
CDCgov:devfrom
glstott:811-multicolor-nodes

Conversation

@glstott

@glstott glstott commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This addresses GH enhancement issue #811

Summary

  • Added a “Mixed Values” node color option that renders delimited node color values, such as 2a/3a, as multi-color node fills when coloring nodes by a field.
  • Added shared mixed node color parsing and fill-style support:
    • splits supported delimiters into component color categories
    • preserves color/transparency mapping per component
    • treats empty, null, undefined, NaN, N/A, and n/a as missing values
  • Updated node color tables to show positive fractional mixed counts instead of hiding values below 1.
  • Added mixed-color rendering across 2D, Map, Bubble, and Phylogenetic views.
  • Fixed mixed-color border rendering so simple multi-color nodes use the same visible border thickness as single-color nodes, while custom icon shapes that should not use borders still suppress them.
  • Added SVG export handling so mixed-color node fills export as vector gradients where needed.
  • Added mixed node shape SVG helpers and unit coverage for gradient fills, custom shape clipping, border scaling, and stroke suppression.
  • Added Cypress mixed-genotype fixtures and a mixed node coloring journey covering 2D, Bubble, Map, and Phylogenetic views.

@glstott

glstott commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Cypress tests passing.

@glstott

glstott commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Test files:
811-Multicolor_nodes.zip

@dacowan404

Copy link
Copy Markdown
Collaborator

I reviewed this PR this morning and I have a couple of notes:

  1. There are two nodes with genotype as 'N/A' or 'n/a', when node color by is set to genotype these nodes are counted as (Empty) in the node color table which suggests they are yellow, but in the actual network they are a different color. When node shape is set to genotype 'N/A', 'n/a', and (Empty) are all counted separately and have different shapes.
  2. In bubble view with collapse nodes (color set to genotype), the tooltip shows the counts such as 1 2a node and 1 2a/2b node; however the color in the pie chart suggest 2 nodes of type 2a. I haven't tested this with the new feature of collapsed nodes in 2D view.
  3. I'm interested in getting the team perspective of how mixed genotype nodes should affect the counts on node color table. Currently a node with type 2a/2b counts as 0.5 for each. Nodes with 3 types count as 0.33333... each, if nothing else, we should round this so we don't have 10 decimal places on the table.

mossy426-cdc and others added 6 commits August 14, 2026 15:26
# Conflicts:
#	cypress/e2e/view-state/bubble-view.cy.ts
#	src/app/contactTraceCommonServices/color-mapping.service.spec.ts
#	src/app/contactTraceCommonServices/color-mapping.service.ts
#	src/app/contactTraceCommonServices/common.service.ts
#	src/app/microbe-trace-next-plugin.component.html
#	src/app/microbe-trace-next-plugin.component.ts
#	src/app/visualizationComponents/BubbleComponent/bubble.component.ts
#	src/app/visualizationComponents/MapComponent/map-plugin.component.ts
#	src/app/visualizationComponents/PhylogeneticComponent/phylogenetic-plugin.component.ts
#	src/app/visualizationComponents/TwoDComponent/twoD-plugin.component.ts
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.

3 participants