Skip to main content
Public

Share visualization

Loading preview…

Bar Chart interactive

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 interactive

1
DDasbach.EJ
Last edited Apr 21, 2021
Created on Apr 20, 2021

This interactive bar chart visualizes a dataset of 50 random values, with bars colored on a blue scale and labeled with their numeric values. Clicking the text prompt triggers an update that replaces the data with 25 new random values, resizing the bars accordingly. Built with D3 v6, the example uses the scaleBand and scaleLinear APIs to map data to SVG rectangles, while the d3.select method binds the click event to the paragraph element.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed