Skip to content

Releases: d3/d3-path

v1.0.3

23 Nov 00:40
Compare
Choose a tag to compare
  • Use string concatenation instead of array.join to improve performance (#9).

v1.0.2

12 Sep 23:23
Compare
Choose a tag to compare
  • Update Rollup.

v1.0.1

02 Aug 21:43
Compare
Choose a tag to compare
  • Add module entry point to package.json.

v1.0.0

14 Jun 21:26
Compare
Choose a tag to compare
  • First stable release!

Changes since D3 3.x

The d3.path serializer implements the CanvasPathMethods API, allowing you to write code that can render to either Canvas or SVG. For example, given some code that draws to a canvas:

function drawCircle(context, radius) {
  context.moveTo(radius, 0);
  context.arc(0, 0, radius, 0, 2 * Math.PI);
}

You can render to SVG as follows:

var context = d3.path();
drawCircle(context, 40);
pathElement.setAttribute("d", context.toString());

The path serializer enables d3-shape to support both Canvas and SVG; see line.context and area.context, for example.

See CHANGES for all D3 changes since 3.x.

v0.2.0

08 Jun 00:32
Compare
Choose a tag to compare
  • Export to the global d3 in vanilla environments (d3/d3#2840).

v0.1.5

22 Feb 00:06
Compare
Choose a tag to compare

v0.1.4

29 Jan 19:04
Compare
Choose a tag to compare
  • Generate anonymous AMD.

v0.1.3

18 Dec 18:28
Compare
Choose a tag to compare
  • Improve the README.

v0.1.2

20 Nov 18:56
Compare
Choose a tag to compare
  • Don’t emit an elliptical arc (A) command if the radius of path.arc is zero.

v0.1.1

20 Nov 00:15
Compare
Choose a tag to compare
  • path.arc now implements the optional anticlockwise flag.