1.8.0 • Published 9 months ago

d3-radial-axis v1.8.0

Weekly downloads
478
License
MIT
Repository
github
Last release
9 months ago

d3-radial-axis

NPM package Build Size NPM Downloads

A radial implementation of the D3 axis component.

To use for instance in a clock or a gauge meter.

Quick start

import { axisRadialInner, axisRadialOuter } from 'd3-radial-axis';

or using a script tag

<script src="//unpkg.com/d3-radial-axis"></script>

then

const myAngleScale = d3.scaleLinear()
    .domain([-10, 10])
    .range([-Math.PI, Math.PI]);
const myRadius = 100;
const myRadialAxis = d3.axisRadialInner(myAngleScale, myRadius);

d3.select(<myDOMElement>).call(myRadialAxis);

API reference

Same features as the regular D3 axis.

d3.axisRadialOuter()
    .ticks()
    .tickArguments()
    .tickValues()
    .tickFormat()
    .tickSize()
    .tickSizeInner()
    .tickSizeOuter()
    .tickPadding()

Includes additional properties to configure the radial axis, the angleScale, and the axis radius.

Also supports the representation of a spiral axis when setting a pair of startRadius and endRadius.

d3.axisRadialOuter()
    .angleScale()
    .radius()
    .startRadius()
    .endRadius()
1.8.0

9 months ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.5

3 years ago

1.6.4

4 years ago

1.6.3

4 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago