Skip to main content
Public

Share visualization

Loading preview…

Bar Chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Bar Chart

0
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.

Comments

Sign in to join the discussion.

MIT Licensed