D3 - SVG module

Card Puncher Data Processing


The svg module provides various shapes suitable for charting.


The arc function, builds elliptical arcs as for pie and donut charts by mapping arbitrary data to paths; typically this function is bound to the “d” attribute of SVG path elements Note that the radii and angles of the arcs can be specified either as constants or as functions—in the latter case, the functions are evaluated per element with access to data—identical to D3’s core operators.

     .data([[1, 1.2, 1.7, 1.5, .7]])
     .attr("width", 150)
     .attr("height", 150)
     .attr("transform", "translate(75,75)")
     .attr("d", d3.svg.arc().outerRadius(70));

Discover More
Card Puncher Data Processing
D3 - Module

modules are optional in D3 Design.

Share this page:
Follow us:
Task Runner