🌍 Public
Viewing a saved revision (read-only)
6a3b9f0497234a14b6a3324e21d4ba17
Fork of HTML Starter
This example visualizes miles per gallon for various motorcycle models as a horizontal bar chart, sourced from the mtcars dataset. It shows the ranking of each model’s fuel efficiency. The code uses React for component rendering, D3 v5’s `scaleBand` and `scaleLinear` for scales, and `csv` to load the data. Bars are drawn as SVG `rect` elements, with axis ticks and grid lines generated using D3’s `ticks` method. The chart displays values up to the maximum mpg, with a light green page background.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.