Skip to main content
Public

Share visualization

Loading preview…

92. D3 DIV Tooltip

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

92. D3 DIV Tooltip

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

This example demonstrates an interactive bar chart with a hover tooltip. It shows a dataset of 20 numeric values represented as vertical bars, where hovering over a bar reveals its value in an HTML tooltip that follows the cursor. Clicking a bar triggers a sorting animation, alternating between ascending and descending order. The visualization uses D3.js v4.5.0 with `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and SVG rect elements. The tooltip is positioned absolutely and updated on mouseover events.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed