observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.46k stars 182 forks source link

facet positioning breaks for marks that render a SVGSVGElement #2218

Closed Fil closed 1 week ago

Fil commented 3 weeks ago

Elements rendered by a mark are positioned with transform: translate(x,y), which is not supported by SVGSVGElement. So all facets end up at the same location.

It's a bug because our documentation states that the render transform must return an "SVG Element" https://github.com/observablehq/plot/blob/700c6eef9c179fa5bef6bf2a4d5b6a74591d8951/docs/features/marks.md?plain=1#L117

(and SVGSVGElement is a child of SVGElement).