Skip to main content
100%

Styling the Bar Chart

✓ Published1🌍 Public
Llefat92
Last edited Aug 16, 2023
Created on Aug 15, 2023

This example uses React with D3 utilities to render a horizontal bar chart of UN population data from 2019. It shows the ten most populous countries, with the x-axis formatted using D3’s `format` function to abbreviate large numbers (e.g., converting G to B). The chart is styled with Poppins font, custom tick and axis colors, and tooltips that display the same formatted value on hover. The code builds the SVG via React components, with axes and marks generated from D3’s `scaleBand` and `scaleLinear`.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities and uses React to render the data.

MIT Licensed

Similar vizzes