How to add SVG elements to an existing plot

I’ve generated a plot using barX and text marks.

Now I want to stop using the text labels and replace them with a word cloud svg:

I guess one option would be to redo the plot using D3, but I wanted to ask in case there is an easy way to generate SVG marks or to somehow select the <rects> and wrap them in a <g> node along with the word cloud.

1 Like

You can pass a render function as a mark and return SVG elements from it. Here is an example:

Render functions are documented here:

1 Like

Thanks, Mike.

There’s a lot left to improve, but this is what I have so far :sweat_smile: