🌍 Public
Viewing a saved revision (read-only)
9a10a682691240f4bed80110deccb69e
Fork of Rendering (barchart)(Axis : the margin convention) data with react and d3
AAmine HAMOU
Last edited Sep 1, 2021
Created on Aug 17, 2021
Forked from Rendering (barchart) data with react and d3
This example shows a horizontal bar chart of the top ten countries by 2020 population, loaded from a CSV file using d3.csv and rendered as SVG elements. React manages the data state and maps each row to a styled rectangle, with d3-scale’s scaleBand and scaleLinear computing the bar positions and widths. The chart applies a simple margin convention using a translated group element, and d3.v5 utilities fetch and parse the numeric population values before React re-renders the visualization.
AI-generated descriptionA program that loads in some data aboutt css named colors using d3 utilities, and uses React state to render the data