Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Online Sales for Purchases Line chart

Public visualization

Viewing a saved revision (read-only)

2419e031bbca415e8939d118d9045b06

Online Sales for Purchases Line chart

0 stars0🌍 Public
MManideeprenikindi
Last edited Jul 25, 2023
Created on Jul 25, 2023

This example shows a line chart of online sales purchases over time, plotting the number of purchases against the year. The visualization uses a D3 v5 SVG render, with a time-scaled X-axis and a linear Y-axis. It loads CSV data from a GitHub gist, parsing the year with `d3.timeParse` and scaling the line with `d3.line`. Styled with a purple stroke and custom tick formatting, the chart includes axis labels for "Year" and "N_Purchases," with gridlines. The code demonstrates modular D3 imports and axis construction.

AI-generated description

A demonstration of how to start using D3 version 6.