Skip to main content
100%

Axis Labels in v7

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

This example shows a line chart of stock closing prices over time, with clearly labeled x and y axes. The chart uses d3.line to generate the path, d3.scaleTime and d3.scaleLinear for the scales, and d3.axisBottom and d3.axisLeft to render the ticks. Axis labels are added as SVG text elements, with the y-axis label rotated using an SVG transform. Data is loaded from a CSV file and parsed with d3.timeParse, with the visualization rendered as SVG inside a single group element.

AI-generated description

This is a simple line graph demonstrating the addition of axis labels.

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