May 2019
Beginner to intermediate
650 pages
14h 50m
English
With paths you can draw open and closed shapes mixing lines, curves and arcs using a compact drawing language in the d attribute of the <path> element. It can be used to create arbitrary paths mixing straight lines and curves:
<path d="M100,200 C200,50 300,100 300,200 L400,250 500,100" fill="yellow" stroke="red" stroke-width="4"/>
Don't worry about all those numbers and letters in the d attribute. It's the most important part of the path, but it can always be generated for you. Most of the shape generators you will use in D3 to create lines, pie slices and other arbitrary shapes generate path strings that you can use in the d attribute.
The simple <path> above renders the image below (the dots are added separately and show the control ...
Read now
Unlock full access