Bar Chart
✓ Published0🌍 Public
This example visualizes hotel booking data from a cleaned CSV file, showing both the average price per year and the booking count per year in two separate pie charts. The code uses D3 version 6 to load the data, group it by year, and compute aggregate values. Each chart uses the d3.pie and d3.arc generators to create slices, with d3.scaleOrdinal and d3.schemeCategory10 for coloring. Interactive hover effects highlight slices by changing their fill color and scale, while legends display the year and corresponding values. The visualization is rendered as SVG elements.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed