new d3
✓ Published0🌍 Public
This example displays a horizontal bar chart of the populations of five countries, with bars animating to a reduced opacity on mouseover and a tooltip indicating the country name. The visualization loads population data from a local CSV file, and uses D3 v6’s modular `select`, `csv`, `scaleBand`, `scaleLinear`, `axisBottom`, and `axisLeft` APIs to construct the SVG bar chart. The code applies custom tick formatting for millions and uses a transition to animate bar opacity, while omitting axis lines and ticks for the categorical axis.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed