Skip to main content
100%

Bar Chart - React & D3 (Part 22) - Commercialised

✓ Published1🌍 Public
TTom-S82
Last edited Sep 8, 2020
Created on Aug 31, 2020

This bar chart displays the ten most populated countries in 2020 based on UN population estimates. Built with React and D3 v5, it renders SVG rectangles whose lengths animate from zero to their final values using the `<animate>` element. The chart uses `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis, with axes split into separate files. Alternating blue and orange vertical gradients give the bars a 3D appearance, while a drop-shadow filter adds depth. Data is loaded via `d3.csv` from a GitHub-hosted CSV file.

AI-generated description

A program that creates a bar chart based on estimated UN Population levels in 2020.


Tutorials:


Extras:

  • Axis split into their own files
  • Animated bar generation when opening or refreshing the visualisation
  • Formatting
    • Bars made to look 3D & experimenting with filtering to give the bars depth
    • Bars formatted with alternating colors
    • Box shadowing on the background to give the chart depth
    • Title added in separate div (flexbox set up)
    • Bottom axis formatted as per this link

Other Documentation:

MIT Licensed

Similar vizzes