D3 Chart
✓ Published0🌍 Public
This example shows a static bar chart built with React and D3.js v4, displaying a simple dataset of nine numeric values as vertical bars. The bars are rendered as SVG rectangles, with heights proportional to the data values and positioned horizontally using a translate transform. The code selects the pre-existing `<svg>` element with the class `bar-chart`, sets its dimensions, and appends rectangles via D3's data join (`enter()` and `append()`). The chart uses `d3.select` and `d3.min` APIs to map values to pixel coordinates.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed