codelion commited on
Commit
dad6bef
·
verified ·
1 Parent(s): 4db2af3

Visualize: selecting a stacked bar keeps its segment colours (only single dots turn pink)

Browse files
Files changed (2) hide show
  1. static/app.css +1 -1
  2. static/visualize.js +1 -1
static/app.css CHANGED
@@ -295,7 +295,7 @@ textarea.in.vq { min-height: 64px; font-size: 19px; }
295
  .chart .mk:hover .ink { fill: #2a39e6; }
296
  .chart .mk:hover .lab { font-weight: 600; }
297
  .chart .mk:focus-visible .hit { stroke: var(--blue); stroke-width: 2; }
298
- .chart .sel .ink, .chart .sel.seg, .chart .sel .seg { fill: var(--pink); }
299
  .chart .sel .ghost { fill: var(--blue); }
300
  .chart .sel .bx { stroke: var(--pink); stroke-width: 2.5; }
301
  .chart circle.sel { fill: var(--pink); opacity: 1; }
 
295
  .chart .mk:hover .ink { fill: #2a39e6; }
296
  .chart .mk:hover .lab { font-weight: 600; }
297
  .chart .mk:focus-visible .hit { stroke: var(--blue); stroke-width: 2; }
298
+ .chart .sel .ink { fill: var(--pink); }
299
  .chart .sel .ghost { fill: var(--blue); }
300
  .chart .sel .bx { stroke: var(--pink); stroke-width: 2.5; }
301
  .chart circle.sel { fill: var(--pink); opacity: 1; }
static/visualize.js CHANGED
@@ -265,7 +265,7 @@
265
  const ids = V.sel ? new Set(V.sel.ids) : null;
266
  document.querySelectorAll("[data-vzids]").forEach((el) => {
267
  const mine = el.dataset.vzids.split(",").filter(Boolean).map(Number);
268
- const hit = ids && mine.length && mine.every((i) => ids.has(i)) && (V.sel.label === el.dataset.vzsel || mine.length === 1 && ids.has(mine[0]));
269
  el.classList.toggle("sel", !!hit);
270
  el.classList.toggle("dim", !!ids && !hit && !el.classList.contains("lg") && !mine.some((i) => ids.has(i)));
271
  });
 
265
  const ids = V.sel ? new Set(V.sel.ids) : null;
266
  document.querySelectorAll("[data-vzids]").forEach((el) => {
267
  const mine = el.dataset.vzids.split(",").filter(Boolean).map(Number);
268
+ const hit = ids && mine.length && mine.every((i) => ids.has(i)) && (V.sel.label === el.dataset.vzsel || el.tagName.toLowerCase() === "circle" && ids.has(mine[0]));
269
  el.classList.toggle("sel", !!hit);
270
  el.classList.toggle("dim", !!ids && !hit && !el.classList.contains("lg") && !mine.some((i) => ids.has(i)));
271
  });