🌍 Public
Bar Chart of the 10 Highest Skyscrapers in the World
This bar chart displays the heights of the world’s ten tallest skyscrapers, such as the Burj Khalifa and Shanghai Tower, using a static SVG rendered with D3 version 7. The code creates scales with `d3.scaleBand` and `d3.scaleLinear`, then appends SVG `<rect>` elements for each bar. Axes are drawn using `d3.axisBottom` and `d3.axisLeft`, while mouseover and mouseout events change bar fill colors to red and black. The dataset is hardcoded in JavaScript, with heights in meters.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.