Skip to main content
100%

Yearwise Car Sales Bar Chart

✓ Published0🌍 Public
HHemanthh81
Last edited Jul 21, 2023
Created on Jul 21, 2023
Forked from Activity 7

This D3.js v5 bar chart visualizes car sales figures for the year 1980 across different car makes, using a horizontal bar layout encoded with SVG rectangles. The chart employs `scaleBand` for the categorical y-axis of car brands and `scaleLinear` for the numeric x-axis of sales values, with sales data loaded from a CSV file hosted on GitHub. React manages the rendering pipeline, while the visualization includes formatted tick labels (using `format` to abbreviate large numbers) and tooltips that display the precise sales amount for each bar. The data is processed through a custom `useData` hook that converts the CSV's "1970" column into sales numbers.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes