the margin convention
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top 10 countries by projected 2020 population, loaded as CSV via D3’s `csv` utility. It demonstrates the margin convention by rendering an SVG with a left offset of 200 pixels, using `scaleBand` for the y-axis and `scaleLinear` for the x-axis, with gridlines from `xScale.ticks()`. React manages the state and renders each `<rect>`, `<line>`, and `<text>` element, while D3 provides the data parsing and scales.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!
MIT Licensed