Releases: d3/d3-path
Releases · d3/d3-path
v1.0.3
v1.0.2
v1.0.1
v1.0.0
- 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
- Export to the global
d3
in vanilla environments (d3/d3#2840).