Closed
Description
This example came up in #700 when using a function mark to add a <defs>
element to a chart.
When faceting, the defs will be added to each facet, which is redundant (and illegal if they contain ids). There a contrived way of adding them once only, by giving them an internal counter (state), but it would not be a good practice.
In the case of defs that set gradients and textures, we might argue that they are part of scales—unless they are constants… And sometimes what we want to do is to use the first facet to display some kind of annotation that's needed only once.