1.1.1 • Published 3 years ago

d3-arrows v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

npm

d3-arrows

Helper functions for making curved labels for d3 svg graphics

Installing

If you use NPM, npm install d3-arrows

Usage

d3-arrows exports a function called addLabel. This takes a single argument which is an object with all your label options. el should be a d3 selector for the element you want to add the label to. Currently only one type of arrow is supported, the arc.

The radius, largeArcFlag and sweepFlag properties are optional.

Example use:

addLabel({"el":svg,
	"id":"denison",
	"targetX":projection([151.2,-33.9])[0],
	"targetY":projection([151.2,-33.9])[1],
	"sourceX":projection([154.21,-36.09])[0],
	"sourceY":projection([154.21,-36.09])[1],
	"text":"Fort Denison"
});

A label for Fort Denison in Sydney

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago