Skip to main content
Public

Share visualization

Loading preview…

Fork of 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

Fork of Bar Chart interactive

0
RRahulSai05
Last edited Mar 12, 2022
Created on Mar 12, 2022

This bar chart visualization displays a dataset of 50 randomly generated values as SVG rectangles, with each bar labeled by its numeric value and colored on a purple scale. Built with D3 version 6, the chart uses `d3.scaleBand` for the x-axis positioning and `d3.scaleLinear` for the y-axis scaling. Clicking the text above the chart triggers a one-time update that replaces the dataset with 25 new random values, recalculating the bar heights and positions accordingly.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed