Skip to main content
100%

Multiple line graph in v7

✓ Published0🌍 Public
Dd3noob
Last edited Jun 18, 2021
Created on Jun 18, 2021

This example displays two line graphs on a shared time-based x-axis, comparing the open and close prices from a small CSV dataset over a three-month period. The close price is shown as a steelblue line, while the open price appears in red, with both axes scaled to fit the data. The visualization uses d3.line and d3.scaleTime to map data points, d3.axisBottom and d3.axisLeft to render the axes, and d3.csv to load the data. The SVG output includes two separate path elements styled with CSS classes.

AI-generated description

This is a simple graph demonstrating the display of multiple lines.

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

mit Licensed

Similar vizzes