Skip to content

Commit

Permalink
web:lab: add x=0 mark to QC table inline dists
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-octo committed Nov 22, 2024
1 parent f369469 commit 228c821
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/assets/js/plotting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ function plotQCTableHarmonizedValueDistribution(data) {
if (data.bins.length === 0) {
return "";
} else {
const ticks =
data.xmin < 0 ? [data.xmin, 0, data.xmax] : [data.xmin, data.xmax];
return Plot.plot({
width: 140,
height: 30,
Expand All @@ -488,7 +490,7 @@ function plotQCTableHarmonizedValueDistribution(data) {
style: "overflow: visible;",
x: {
domain: [data.xmin, data.xmax],
ticks: [data.xmin, data.xmax],
ticks: ticks,
label: null,
},
y: {
Expand All @@ -497,6 +499,7 @@ function plotQCTableHarmonizedValueDistribution(data) {
},
marks: [
Plot.ruleY([0]),
Plot.ruleX([0], { stroke: "#aaa", strokeOpacity: 0.1 }),
Plot.rectY(data.bins, {
x1: "x1",
x2: "x2",
Expand Down

0 comments on commit 228c821

Please sign in to comment.