assign 2.1
✓ Published0🌍 Public
This example renders a horizontal bar chart using React and SVG, with data mapped from countries to their numeric values. The chart uses `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, with bars drawn as `rect` elements. The code imports `scaleLinear`, `scaleBand`, and `max` from D3, and the chart’s dimensions are controlled via `width`, `height`, and `margin` props. The visual output is a straightforward comparison of values across categories, without axes or labels.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed