🌍 Public
Viewing a saved revision (read-only)
1f1e6604919042f8b4c3c4579fbd5bd5
Bar Chart
This bar chart displays the population of ten countries (from the UN Population 2019 dataset) using horizontal bars, with the x-axis representing population and the y-axis listing country names. Built with React and D3 v5, the visualization uses `scaleBand` and `scaleLinear` to map data to the SVG coordinate system. Custom `AxisBottom` and `AxisLeft` components render tick marks and labels, while `Marks` creates rectangular bars with a `<title>` element providing tooltip text. Axis tick values are formatted using D3's `format` function, converting large numbers into readable abbreviations like "1.2B".
AI-generated descriptionLoad data with React