Skip to main content
100%

Favorite tooltip (complex version) v5

✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Nov 29, 2019

This example shows a line chart of stock closing prices over time, with an interactive tooltip that follows the mouse cursor. As the user moves over the chart, a dashed crosshair and a highlighted data point appear, along with text displaying the exact date and closing value. Built with D3.js v5, the visualization uses SVG rendering and relies on `d3.line`, `d3.scaleTime`, `d3.bisector`, and `d3.mouse` to compute and display the nearest data point from the provided CSV data.

AI-generated description

This is a follow on from the simple tooltip graph written with d3.js v5 here.

It extends a tooltip technique which I find particularly neat.

This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 5 of d3.js.

mit Licensed

Similar vizzes