🌍 Public
Viewing a saved revision (read-only)
90cf6c029c974e158e9893fb74f906bc
SVG
This example visualizes monthly sales data as a bar chart, with bars colored dark gray or red depending on whether sales exceed 20. It loads data from a local `sales.json` file and renders both bars and labels using SVG. The chart includes a linear y-axis for sales and a band-scaled x-axis for months, both created with `d3.scaleLinear` and `d3.scaleBand`, and formatted via `d3.axisLeft` and `d3.axisBottom`. The code is written for D3 v5 within a React-ready HTML page.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.