Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@redsift/d3-rs-pies

Package Overview
Dependencies
Maintainers
23
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redsift/d3-rs-pies

Generates pie charts using D3v4.

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
23
Created
Source

d3-rs-pies

Circle CI npm MIT

d3-rs-pies generate a range of pie charts via the D3 reusable chart convention.

Example

View @redsift/d3-rs-pies on Codepen

Simple pie chart

Simple pie chart

Pie chart with legend

With legend

Inner radius and padded

Inner radius

Usage

Browser

<script src="//static.redsift.io/reusable/d3-rs-pies/latest/d3-rs-pies.umd-es2015.min.js"></script>
<script>
	var chart = d3_rs_lines.html();
	d3.select('body').datum([ 1, 2, 3, 10, 100 ]).call(chart);
</script>

ES6

import { chart } from "@redsift/d3-rs-pies";
let eml = chart.html();
...

Require

var chart = require("@redsift/d3-rs-pies");
var eml = chart.html();
...

Datum

  • Simplest form, array of numbers: [1,2,3,4...]

Parameters

PropertyDescriptionTransitionPreview
classedString SVG custom classN
width, height, size, scaleInteger SVG container sizesY
styleString Custom CSS to inject into chartN
outerRadiusInteger Radius of the pie
innerRadiusNumber > 0 the radius of the inner region in pixels. < 0, the unit inner radius as a function of the outerRadius

Keywords

FAQs

Package last updated on 15 Aug 2023

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc