This there a way to have to plots conditional?
I have a check box the returns a flag but I can’t work out how to get the marks conditional.
The statement I have:
marks: [
Plot.ruleY([120]), Plot.ruleX([-80]),
Plot.link(data.lines, {x1: "x1", y1: "y1", x2: "x2", y2: "y2", stroke: "rgba(0,0,0,.03)"}),
Plot.dot(data.head, dotOptions),
]
I tried:
Plot.link(() => (check=='yes')?data.lines:null, {x1: "x1", y1: "y1", x2: "x2", y2: "y2", stroke: "rgba(0,0,0,.03)"}),
// and
Plot.link(data.lines, () => (check=='yes')?{x1: "x1", y1: "y1", x2: "x2", y2: "y2", stroke: "rgba(0,0,0,.03)"},{}),
But no luck.