🌍 Public
Viewing a saved revision (read-only)
1e6dea26c92b4df3b64b3156c949e012
bhavya_piechart
This example visualizes the total number of hotel bookings per state using a pie chart, with each slice colored by a categorical scale and accompanied by a legend. Hovering over a slice reveals a tooltip showing the state and its booking total. The implementation uses D3.js v6, including `d3.rollup` to aggregate data from a CSV file, `d3.pie` for layout, and `d3.arc` for rendering SVG paths. The chart is built within a React-free HTML page, with smooth opacity transitions for the tooltip on mouse events.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.