Assignment 10 -- Bar Chart - White Hat
✓ Published0🌍 Public
This bar chart displays the total votes for Donald Trump and Joe Biden in the 2020 California election, with each bar’s height proportional to its vote count. The visualization uses D3.js with SVG rendering and sequential color encoding, mapping vote totals to a red color scale. A hover tooltip reveals exact figures, while the y-axis provides a scaled reference for comparison. The chart is built using D3's `scaleBand`, `scaleLinear`, and `axisLeft` APIs, with data loaded from a CSV file.
AI-generated descriptionThis version is better because it includes the Y axis scale which results in the bars size being accurately proportioned based on the numbers they are representing.
List of changes:
- Numbers removed from top of bars
- Y axis added for scale
- Hover state to show exact figures
MIT Licensed