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 Apr 23, 2024 via pnpm

d3-scale 4.0.2

Encodings that map abstract data to visual representation.
Package summary
Share
0
issues
1
license
8
ISC
Package created
29 Mar 2014
Version published
24 Sep 2021
Maintainers
2
Total deps
8
Direct deps
5
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
8 Packages, Including:
d3-array@3.2.4
d3-color@3.1.0
d3-format@3.1.0
d3-interpolate@3.0.1
d3-scale@4.0.2
d3-time-format@4.1.0
d3-time@3.1.0
internmap@2.0.3
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

5
All Dependencies CSV
β“˜ This is a list of d3-scale 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
d3-array3.2.437.48 kBISC
prod
d3-format3.1.014.48 kBISC
prod
d3-interpolate3.0.117.62 kBISC
prod
d3-time-format4.1.020.89 kBISC
prod
d3-time3.1.013.23 kBISC
prod

Visualizations

Frequently Asked Questions

What does d3-scale do?

D3-scale is an npm package that maps abstract data to visual representation through scales. The scales offer a convenient workflow when mapping a dimension of abstract data to a visual representation. It encompasses a variety of visual encodings such as position, colors, widths, and symbol size, and is compatible with all types of data, such as categorical, discrete, and named. This makes d3-scale a valuable tool in the construction of data visualization projects, like scatterplots, bar charts, or heat maps.

How do you use d3-scale?

Using d3-scale comes with this simple installation via npm: npm install d3-scale. It can then be imported into a project through its module syntax: import {scaleLinear} from "https://cdn.skypack.dev/d3-scale@4". A usage example would be:

<script type="module">
    import {scaleLinear} from "https://cdn.skypack.dev/d3-scale@4";
    const x = scaleLinear();
</script>

Once imported, a scale can then be created and utilized flexibly based on your specific project needs. For instance, a linear scale could be created like so:

var x = d3.scaleLinear()
    .domain([10, 130])
    .range([0, 960]);

x(20); // Returns 80
x(50); // Returns 320

Here, the domain has been set to go from 10 to 130, while the range runs from 0 to 960.

Where are the d3-scale docs?

The documentation for d3-scale is primarily housed in its GitHub repository (https://github.com/d3/d3-scale). The readme provides a thorough overview of the package, along with detailed API references and usage examples for each type of scale (continuous, ordinal, quantize, etc.). There are also links to relevant tutorials and additional resources for further understanding and utilization of the d3-scale tool.