Make a bar chart!
✓ Published1🌍 Public
This example shows a horizontal bar chart of population estimates for ten countries, sourced from the World Population Prospects 2017. The chart uses `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis, with `d3.axisLeft` and `d3.axisBottom` to render ticks. Rectangles are appended to an SVG group after applying the margin convention. Data is loaded from a CSV file and converted to numeric values before rendering.
AI-generated descriptionMake a bar chart. Data from "World Population Prospects 2017" The topic includes representing a data table in JavaScript, creating rectangles for each row, using linear and band scales, the margin convention and adding axes.
MIT Licensed