Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Assignment 10 -- Bar Chart - White Hat

Public visualization

Assignment 10 -- Bar Chart - White Hat

0 stars0🌍 Public
Vvishusikka
Last edited Apr 26, 2022
Created on Apr 25, 2022
Forked from Hello VizHub

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 description

This 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

Comments

Sign in to join the discussion.

MIT Licensed