Skip to main content
100%

tooltips

✓ Published0🌍 Public
Mmnalk
Last edited Nov 7, 2021
Created on Nov 7, 2021
Forked from D3 Starter

This heatmap visualizes male and female suicide rates across eight countries using a subset of the Suicide Rates Overview 1985 to 2016 dataset. Each cell is colored with a sequential d3.interpolateInferno scale, and hovering triggers three distinct functions—mouseover, mousemove, and mouseleave—that reveal the exact suicide count in a styled tooltip. The visualization is built with D3 v4, rendering SVG rectangles with axis scales created by d3.scaleBand.

AI-generated description

A demonstration of how to bulid a heatmap with mouseover, and mouseleave behaviour in 3 distinct functions. The square style is slightly modified when the element is hovered. It allows to make more obvious which element is observed. In this exmple I used only subset of the dataset as follow:

Japan Mexico Brazil Argentina Philippines Russia Turkey France

Then, I represent male and female suicide rates.

DATASET

Suicide Rates Overview 1985 to 2016

This work inspierd from here

MIT Licensed

Similar vizzes