🌍 Public
Viewing a saved revision (read-only)
6f6c5222d9294c79a6346f028d32bd15
D3 Plot with React
This example visualizes the Iris dataset as a scatter plot of petal length against sepal width, with each flower represented by a circle. It uses React to render SVG elements, while d3-scale’s `scaleLinear` computes the x and y positions and d3-array’s `extent` sets the domains. Custom React components (AxisBottom, AxisLeft, Marks) generate ticks and circles. Data loads asynchronously via d3-fetch’s `csv` from a GitHub gist. The chart includes rotated and positioned axis labels, and hover tooltips using SVG `<title>` elements.
AI-generated descriptionA program that shows the top 10 most populous countries as a bar chart.