Multiple line graph in v4
✓ Published0🌍 Public
Dd3noob
Last edited Jul 12, 2016
Created on Jul 12, 2016
This example displays two time-series lines—one for closing prices and one for opening prices—in a single SVG chart using D3 v4. The chart uses `d3.csv` to load data from a CSV file, `d3.timeParse` to convert dates, and `d3.scaleTime` and `d3.scaleLinear` for the axes. Two `d3.line` generators create the paths, with the second line styled red via `.style("stroke", "red")`. Axis rendering uses `d3.axisBottom` and `d3.axisLeft`.
AI-generated descriptionThis is a simple graph demonstrating the display of multiple lines. 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.