Skip to main content
100%

Multiple line graph in v5

✓ Published0🌍 Public
Dd3noob
Last edited Nov 28, 2019
Created on Nov 26, 2019

This example shows two time-series lines, one for closing prices and one for opening prices, plotted against dates from a CSV file. The visualization uses d3.scaleTime and d3.scaleLinear to map data to x and y axes, with d3.line generating the two path elements. A steelblue line represents the close values, while a red line, styled via a second `.line` class, represents the open values. The axes are rendered with d3.axisBottom and d3.axisLeft in an SVG container sized at 960 by 500 pixels.

AI-generated description

This is a simple graph demonstrating the display of multiple lines. This was written using d3.js v5 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 5 of d3.js.

mit Licensed

Similar vizzes