3 ms·
Apologies if I missed examples, how about interactive tooltip and interactive legend support? I'm sure it's doable since so many libs based on d3 do it.
by totalhack 3y ago
Apologies if I missed examples, how about interactive tooltip and interactive legend support? I'm sure it's doable since so many libs based on d3 do it.
- mbostock 3y agoWe haven’t implemented it yet, but that’s what we’re working on right now! There’s a PR up here (we just took a small break to focus on TypeScript declarations and then the new documentation website): https://github.com/observablehq/plot/pull/1304 https://github.com/observablehq/plot/pull/1304 In the meantime, you can do lots of interactive stuff with the SVG that Plot generates. There’s a nice tooltip plugin by Mike Freeman here: https://observablehq.com/@mkfreeman/plot-tooltip https://observablehq.com/@mkfreeman/plot-tooltip
- totalhack 3y agoExcellent. If I could recommend some inspiration, NVD3 (no longer maintained) had the exact set of features I found useful, as does billboard.js (https://naver.github.io/billboard.js/demo/#Chart.AreaChart https://naver.github.io/billboard.js/demo/#Chart.AreaChart). Namely the ability to hide/focus/show certain series from the legend, showing all series in the interactive tooltip, and (NVD3) highlighting in the tooltip which series you are directly hovered over. These all become helpful when you start charting lots of stuff at once. Thanks for being the bedrock of all of this stuff!
- simonw 3y agoYes! I've been looking forward to official tooltip support for ages.