Skip to main content
100%

Bar Chart

✓ Published0🌍 Public
Kkakumanusreya
Last edited Apr 8, 2023
Created on Apr 8, 2023
Forked from D3 Starter

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 description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes