O'Reilly logo

Practical D3.js by Rayna Stamboliyska, Tarek Amr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Tarek Amr and Rayna Stamboliyska 2016

Tarek Amr and Rayna Stamboliyska, Practical D3.js, 10.1007/978-1-4842-1928-7_6

6. Creating Complex Shapes

Tarek Amr and Rayna Stamboliyska2

(1)Amsterdam, The Netherlands

(2)Issy-les-Moulineaux, Paris, France

This chapter introduces SVG Paths, and explains how you can use them in D3 to create any shapes you want. You will also learn about D3 Path Generators and how to use them to make the creation of paths easier.

Forget Rectangles, Go Freehand

Unless you are Piet Mondrian1, you cannot limit yourself to drawing only rectangles, and eventually circles. SVG provides a path element that allows you to draw anything, from line charts to the world map. D3, in turn, makes use of the path element to draw interesting and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required