Socket
Socket
Sign inDemoInstall

d3plus-export

Package Overview
Dependencies
2
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    d3plus-export

Export methods for transforming and downloading SVG.


Version published
Weekly downloads
422
decreased by-6.43%
Maintainers
1
Install size
659 kB
Created
Weekly downloads
 

Readme

Source

d3plus-export

Export methods for transforming and downloading SVG.

Installing

If using npm, npm install d3plus-export. Otherwise, you can download the latest release from GitHub or load from a CDN.

import modules from "d3plus-export";

d3plus-export can be loaded as a standalone library or bundled as part of D3plus. ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3plus global is exported:

<script src="https://cdn.jsdelivr.net/npm/d3plus-export@1"></script>
<script>
  console.log(d3plus);
</script>

Examples

Live examples can be found on d3plus.org, which includes a collection of example visualizations using d3plus-react. These examples are powered by the d3plus-storybook repo, and PRs are always welcome. :beers:

API Reference

  • saveElement - Downloads an HTML Element as a bitmap PNG image.

d3plus.saveElement(elem, [options], [renderOptions]) <>

Downloads an HTML Element as a bitmap PNG image.

This is a global function.

ParamTypeDefaultDescription
elemHTMLElementA single element to be saved to one file.
[options]ObjectAdditional options to specify.
[options.filename]String"download"Filename for the downloaded file, without the extension.
[options.type]String"png"File type of the saved document. Accepted values are "png" and "jpg".
[options.callback]functionFunction to be invoked after saving is complete.
[renderOptions]ObjectCustom options to be passed to the html-to-image function.

Documentation generated on Tue, 04 Apr 2023 21:45:19 GMT

Keywords

FAQs

Last updated on 04 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc