Skip to main content
100%

Simple graph with filled area in v4

✓ Published0🌍 Public
Dd3noob
Last edited Jul 11, 2016
Created on Jul 11, 2016

This example shows a line graph of daily closing values with a filled area beneath the line, using a simple time-series dataset parsed from CSV. The visualization is rendered as SVG using D3 v4, with `d3.scaleTime` and `d3.scaleLinear` mapping dates and values to pixel coordinates. The area is generated via `d3.area`, while the line uses `d3.line`, and both axes are drawn with `d3.axisBottom` and `d3.axisLeft`. The data comes from a local `data.csv` file containing date and close columns.

AI-generated description

This is a simple graph demonstrating the addition of a filled area in conjunction with a line graph. This was written using d3.js v4 and is a follow on to the simple graph example here.

This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 4 of d3.js.

Similar vizzes