Hello, I’m new to observable plot, and am trying to figure out a good way to give SVG elements created by Plot.plot a unique label so I can find them later through e.g. d3.
As a hack, currently, I’m trying to give Plot.ruleX
an ariaLabel
and even though this turns up in the MarkOptions
, the generated SVG group and line don’t have them. So, this does NOT work:
rule = Plot.ruleX(..., {ariaLabel: "abc"})
However, setting the object later, does work (but it’s really hacky, as this attribute is not in the documented types):
rule = Plot.ruleX(...)
rule.ariaLabel = "abc"
So, I’m now wondering if there is any official and supported way to do something similar.