Book Image

Data Visualization with D3 and AngularJS

By : Erik Hanchett, Christoph Körner
Book Image

Data Visualization with D3 and AngularJS

By: Erik Hanchett, Christoph Körner

Overview of this book

Table of Contents (16 chapters)
Data Visualization with D3 and AngularJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, you learned the basics of SVG curves and shapes and how they are generated in D3.js.

In the first section, we saw common shapes such as rectangles (with round corners), ellipses, polygons, and so on. These shapes are very easy to construct because they take a small number of self explaining arguments. The polygon element is the most flexible common shape because we can connect an arbitrary number of data points with straight lines to a shape. Next, we saw the various commands responsible for drawing curves and lines with the path element. Every line starts with the moveto command and takes an arbitrary number of commands and coordinates. We saw the lineto and curveto commands as well as elliptic arcs.

This chapter also contained a small introduction to the origin of Bézier curves as a parametric version for polynomial functions with the use of binomial expansion. This enables us to modify the shape of the polynomial function with start, end, and control points rather...