Using line curve

By default, the D3 line generator uses the linear curve mode; however, D3 supports a number of different curve factories. The curve function determines how data points will be connected, for example, by a straight line (linear) or a curved line (B-spline). In this recipe, we will show you how these curve modes can be set along with their effects.

Getting ready

Open your local copy of the following file in your web browser:

This recipe is built on top of what we did in the previous recipe, so if you are not

yet familiar with basic line generator functions, please refer to the previous recipe first

before proceeding.

How to do it...

Now, let's take a ...

Get Data Visualization with D3 4.x Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.