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

Method save_svg

js/src/Figure.ts:1423–1432  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

1421 }
1422
1423 save_svg(filename: string) {
1424 this.get_svg().then((xml) => {
1425 const a = document.createElement('a');
1426 a.download = filename || 'bqplot.svg';
1427 a.href = 'data:text/plain;charset=utf-8,' + encodeURIComponent(xml);
1428 document.body.appendChild(a);
1429 a.click();
1430 document.body.removeChild(a);
1431 });
1432 }
1433
1434 async getPixel(x, y) {
1435 const canvas = await this.get_rendered_canvas(window.devicePixelRatio);

Callers

nothing calls this directly

Calls 2

get_svgMethod · 0.95
clickMethod · 0.45

Tested by

no test coverage detected