Line Chart
✓ Published0🌍 Public
This example shows a line chart tracking the cost of sales from 2000 to 2013, with time on the x-axis and cost on the y-axis. The visualization uses D3 v5 to load CSV data, apply a time scale via `scaleTime` and a linear scale via `scaleLinear`, and render axes with `axisBottom` and `axisLeft`. A `line` generator creates the path, with gridlines drawn through tick sizing and a red stroke styled in CSS. The SVG output is centered on a fixed 960×500 canvas.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed