MCPcopy Index your code
hub / github.com/bqplot/bqplot / upload_svg

Method upload_svg

js/src/Figure.ts:1396–1409  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

1394 }
1395
1396 async upload_svg(model) {
1397 const svg_string = await this.get_svg();
1398 const svg_blob = new Blob([svg_string], {
1399 type: 'image/svg+xml;charset=utf-8',
1400 });
1401 const svg_buffer = await svg_blob.arrayBuffer();
1402 model.send(
1403 {
1404 event: 'upload_svg',
1405 },
1406 null,
1407 [svg_buffer]
1408 );
1409 }
1410
1411 save_png(filename, scale) {
1412 // Render a SVG data into a canvas and download as PNG.

Callers

nothing calls this directly

Calls 2

get_svgMethod · 0.95
sendMethod · 0.80

Tested by

no test coverage detected