๐ Public
Axes with Reactsies
This example shows 2019 population data for ten countries as horizontal bars with SVG axes built manually. React state manages the CSV data loaded via `d3.csv`, while `scaleBand` positions countries along the y-axis and `scaleLinear` maps population values to bar widths. The code generates tick marks and labels by iterating over `xScale.ticks()` and the y-domain, drawing grid lines and text with SVG elements.
AI-generated descriptionA program that loads in some data about CSS colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed
Comments
Sign in to join the discussion.