Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 3, 2024 via pnpm

d3-shape 3.2.0

Graphical primitives for visualization, such as lines and areas.
Package summary
Share
0
issues
1
license
2
ISC
Package created
11 Nov 2015
Version published
20 Dec 2022
Maintainers
2
Total deps
2
Direct deps
1
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
d3-path@3.1.0
d3-shape@3.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of d3-shape 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
d3-path3.1.05.62 kBISC
prod

Visualizations

Frequently Asked Questions

What does d3-shape do?

The d3-shape is a JavaScript package providing visual representations of data by generating primitive shapes like lines, arcs, and areas used in data visualizations. It's a module in D3, a library for producing dynamic, interactive data visualizations. With d3-shape, complex shapes, such as rounded annular sectors and centripetal Catmull–Rom splines, can be formed. It maps your data to visual representations using shape generators, enabling you to create a variety of shapes for charts and diagrams with inputs from your data set.

How do you use d3-shape?

To use d3-shape, it can be installed via npm using the command npm install d3-shape. After installation, the package can be imported into your project. Here is an example of creating a line generator with d3-shape:

import { line } from "d3-shape";

const l = line();

The line generator can be used to compute SVG path element attributes, or to render to a Canvas 2D context:

const l = d3.line()
    .x(d => x(d.date))
    .y(d => y(d.value));

path.datum(data).attr("d", l);

// Or

l.context(context)(data);

D3-shape can also be loaded directly in a browser using script tags:

<script src="https://cdn.jsdelivr.net/npm/d3-path@3"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-shape@3"></script>

Where are the d3-shape docs?

The d3-shape package documentation can be found on the GitHub repository at https://github.com/d3/d3-shape. The readme file contains detailed instructions on installation and usage, with methods and properties listed under the API Reference section. It includes explanations and usage examples for different geometric shapes and advanced features like custom curves and symbol types. It also links to other related resources for further learning.