Simple graph with table in v6
This example combines a simple line graph with an accompanying HTML table, both rendered from the same CSV dataset of date and closing price values. The line chart uses SVG with d3.scaleTime and d3.scaleLinear to map the data, while d3.line generates the path and d3.axisBottom and d3.axisLeft add the axes. A separate table is generated below the chart using d3.select to append elements, displaying the raw date and close values in a Courier font. The code relies on d3.csv for data loading and d3.timeParse for date formatting.
AI-generated descriptionThis is a simple graph demonstrating the addition of a table with a graph (open in full screen to see the table). This was written using d3.js v6 and is a follow on to the simple line graph.
This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 6 of d3.js.