Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart - good

Public visualization

Bar Chart - good

0 stars0🌍 Public
Ddriftcafe
Last edited Apr 24, 2022
Created on Apr 24, 2022

This bar chart displays the total votes for Donald Trump and Joe Biden in the 2020 California election, with bars sized by vote count and colored using a sequential red color scale from `colorbrewer`. The visualization emphasizes the vote margin between the two candidates. Implemented with D3 v6, it uses `d3.scaleBand` and `d3.scaleLinear` to position bars, and includes a mouseover tooltip showing formatted vote totals via `d3.format(',.2f')`. The chart loads data from a CSV file and renders as SVG with animated transitions.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed