Skip to main content
100%

bar chart

✓ Published0🌍 Public
Llohitsai.nikkil@gmail.com
Last edited Oct 19, 2025
Created on Oct 19, 2025
Forked from HTML Starter

A bar chart displays the top 15 smartphone models ranked by units sold in millions, with each bar colored by brand using a pastel ordinal scale. The React app loads CSV data via d3.csv, sorts it descending, and renders SVG bars with value labels, hover tooltips showing price, rating, and battery life, plus a legend. The visualization uses d3.scaleBand for the categorical y-axis, d3.scaleLinear for the numeric x-axis, and d3.scaleOrdinal with schemePastel1 for coloring, all within a React functional component using useState and useEffect.

AI-generated description
MIT Licensed

Similar vizzes