(data2, mime)
| 142257 | return type === (0, _vegaScenegraph.RenderType).SVG ? toBlobURL(r.svg(), "image/svg+xml") : r.canvas().toDataURL("image/png"); |
| 142258 | } |
| 142259 | function toBlobURL(data2, mime) { |
| 142260 | const blob = new Blob([ |
| 142261 | data2 |
| 142262 | ], { |
| 142263 | type: mime |
| 142264 | }); |
| 142265 | return window.URL.createObjectURL(blob); |
| 142266 | } |
| 142267 | /** |
| 142268 | * Produce a Canvas instance containing a rendered visualization. |
| 142269 | * This method is asynchronous, returning a Promise instance. |