Using a line generator
D3 line generator is probably one of the most versatile generators. Though it is called a "line" generator, it has little to do with the
svg:line element. In contrast, it is implemented using the
svg:path element. Like
line generator is so flexible that you can effectively draw any shape using
line alone, however, to make your life easier, D3 also provides other more specialized shape generators, which will be covered in later recipes in this chapter. In this recipe, we will draw multiple data-driven lines using the
Open your local copy of the following file in your web browser:
How to do it...