New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

d3-snap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-snap

Captures d3.js visualizations in the server.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

d3-snap

d3-snap Logo

d3-snap Don't limit yourself just to the browser. Visualize your data also on the server.

Supported Versions:

D3.js jsdom

Features

  • Capture D3.js visualizations on the server.
  • Easy integration with existing D3.js projects.

🚀 Quick Installation

Download Dependencies

Download the d3-snap package from npm:

npm i d3-snap

🙌 Hello World Example

Here's a simple example of how to use d3-snap:

  • Create a file named main.mjs in your src folder.
  • Add the following code to main.mjs:
import { D3Snap } from "d3-snap";

const node = new D3Snap({
  container: "<section><svg></svg></section>",
  selector: "svg",
});
const svg = node.createSVG(50, 50);
svg
  .append("text")
  .text("Hello, D3!")
  .attr("x", 10)
  .attr("y", 20);

console.log("Svg message: ", node.svgToString());

📚 Documentation

view - Documentation

✍ Do you want to learn more?

  • Learn more about D3.js.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Technologies used

JsDom
JsDom
D3.js
D3.js

License

Released under MIT by @MetalbolicX.

Keywords

d3

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

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