Closed visnup closed 5 years ago
Why would SVG be more appropriate? I feel like using the Vega default would be more appropriate?
Though, it’d still be nice to let you choose, say by letting vegalite take an optional options argument.
The specific use-case I run into is doing any searching in page for text, which fails against canvas-rendered content. Everything else to me in observable is text/markup-friendly, though I'm probably consciously ignoring all of the WebGL things.
For an options argument, something like:
vegalite(spec, { renderer: "svg" })
?
I'm working on a fork that uses Vega-Embed and would support cusotmizing the renderer among many other things. I will send a PR when I've cleaned ups some messy hacks.
Actually, I recommend that you use https://github.com/vega/vega-embed instead.
The default otherwise is
"canvas"
, but it feels like SVG would be more appropriate for most Observable usage.This could be opt-in via either yet another module or duplicating this into
svg.js
and using longerrequire
syntax from a notebook: