Skip to main content
100%

D3.js Step by Step: Step 5 - Adding Tooltips

✓ Published0🌍 Public
Jjithendra9582
Last edited May 24, 2022
Created on May 24, 2022
Forked from HTML Starter

This donut chart visualizes aggravated assault counts by state using the FBI’s estimated_crimes.csv dataset, with each slice colored by year via `d3.scale.category20b()`. Hovering over a slice triggers a tooltip that displays the state name, assault count, and a calculated percentage, using `d3.svg.arc`, `d3.layout.pie`, and mouseover events. The SVG chart includes a legend and fixed dimensions, with tooltips styled as absolutely positioned HTML divs.

AI-generated description
MIT Licensed

Similar vizzes