Skip to main content
100%

Heatmap with tooltip

✓ Published0🌍 Public
LLewis Ward
Last edited Jul 27, 2021
Created on Jul 27, 2021
Forked from D3 Starter

This example shows a 10x10 heatmap with a custom tooltip that reveals the exact value of each cell on hover. The data is loaded from a CSV file and rendered as colored squares, with a linear color scale mapping values from white to teal. Built with D3 version 6, the visualization uses `d3.scaleBand` for axes, `d3.scaleLinear` for the color encoding, and event listeners for mouse interactions. The tooltip is a styled HTML div appended to the page, positioned using the event’s coordinates and updated on mousemove.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes