Skip to main content
100%

Formatted time labels for an axis with v4

✓ Published0🌍 Public
Dd3noob
Last edited Jul 4, 2016
Created on Jul 4, 2016

This example shows a simple line chart of stock closing prices over time, using formatted and rotated date labels on the x-axis. The visualization is built with d3.v4 and rendered as an SVG. It parses dates from a CSV file using `d3.timeParse` and `d3.timeFormat`, applies the axis with `d3.axisBottom` and rotated tick text, and draws the line with a `d3.line` generator. The code follows the structure of a basic d3 line graph, with margins, scales, and data mapping defined explicitly.

AI-generated description

This is a simple line graph demonstrating rotated / formatted axis labels. This was written using d3.js v4 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 4 of d3.js.

Similar vizzes