0.0.2 • Published 8 years ago

@redsift/d3-rs-polars v0.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

d3-rs-polars

d3-rs-polars generate a range of pie charts.

Builds

Circle CI

Example

View @redsift/d3-rs-polars on Codepen

Line chart

Sample bars with a bottom orientation

Area chart

Sample bars with a left orientation

Combination

Sample bars with a top orientation and time label

Usage

Browser

<script src="//static.redsift.io/reusable/d3-rs-polars/latest/d3-rs-polars.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-polars";
let eml = chart.html();
...

Require

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

Datum

  • Simplest form, array of unit numbers: [0.1, 1, 0.5 ,0.3...]

Parameters

PropertyDescriptionTransitionPreview
classedString SVG custom classN
width, height, size, scaleInteger SVG container sizes. Typically, use size to scale the chartY
marginObject, Number Margin affecting all chart elements
insetNumber Margin affecting primary chart element
styleString Custom CSS to inject into chartN
backgroundColor
theme*lightdark*
languageString
outerRadiusInteger Radius of the largest arc. Default is null and is set automatically as a funciton of the size
paddingNumber Pixels between polar arcs
thicknessNumber Pixel thickness of the arc
cornerRadiusNumber Pixel rounding of the arc ends
reverseBoolean Reverse the arc fill computation
padAngleNumber Radians to pad between the data values 0 and 1. By default, an arc between 0 and 1 will form a complete circle
startAngleNumber Radian position of 0
displayValue
displayFormatValue
fill
displayTip
legendArray