Skip to main content
Public

Share visualization

Loading preview…

63. D3 Delay Static

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

63. D3 Delay Static

0
Aamakanju@nyit.edu
Last edited Feb 26, 2026
Created on Feb 23, 2026

This example shows a static bar chart updating its values when the user clicks on text, with all rectangles and labels transitioning simultaneously after a fixed one-second delay. The chart initially displays 20 data points as vertical bars with white numeric labels, then replaces them with a new dataset on click. Built with D3.js version 4.5.0, the code uses `d3.scaleBand` and `d3.scaleLinear` for positioning and sizing, and applies a `.delay(1000)` followed by `.duration(2000)` to both the rect and text transitions, animating height, fill color, and label positions as SVG elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed