(filename: string)
| 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); |