🌍 Public
Viewing a saved revision (read-only)
b29078befb824d3bbe1a5717cc583d53
Making a piechart?
This example demonstrates a bar chart comparing carbon dioxide emissions (tCO2) across three scopes, using a horizontal layout with labeled axes. The visualization renders SVG elements within a React framework, leveraging D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position bars and ticks. Data is loaded from a CSV file and parsed to numeric values, with the chart built by appending grouped rectangles and text labels inside an SVG container. The code also defines margins dynamically and applies a steel blue fill to the bars.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.