Akhil -vizhub assignment bat-scatter
✓ Published14🌍 Public
This bar chart displays the total price of vehicles aggregated by vehicle type, showing that SUVs and hatchbacks have the highest sales values. The visualization uses D3.js v5 within a React component to load CSV data from a GitHub gist, aggregate prices by type using JavaScript’s reduce, and render horizontal bars via SVG rect elements. Axes are created with d3.axisBottom and d3.axisLeft, while scales from d3.scaleBand and d3.scaleLinear map vehicle types to bar positions and lengths. The chart includes labeled axes for “Average Price” and “Vehicle Type,” with hover effects defined in CSS.
AI-generated descriptionMIT Licensed