Skip to main content
100%

Fork of Fork of Let's make a Bar Graph with D3.js

✓ Published0🌍 Public
JJoyce Robbins
Last edited Dec 14, 2022
Created on Dec 14, 2022

This example shows a horizontal bar chart of population data for eleven countries, using D3.js v7 to render the visualization as SVG elements. The chart displays populations in millions, with country names on the y-axis and population values on the x-axis, using `d3.scaleLinear` and `d3.scaleBand` for the scales. Hovering over a bar triggers a transition that changes its opacity and displays a temporary tooltip text element, which is removed on mouseout. The data is loaded from a CSV file using `d3.csv` and parsed into numeric values for rendering.

AI-generated description
MIT Licensed

Similar vizzes