Draggable Plot

The recent publication of `Declarative Dragging’ (D2) — https://declarative-dragging.github.io — seems like an important development in goal of keeping visualization specification declarative.

@tophtucker provided a nice introduction to its approach and origins here: https://observablehq.com/@tophtucker/hello-dragology

I was excited to try it out with Plot since they have what feels like a matching level of abstraction and easy integration with Observable’s reactive approach. I’ve long wanted to make my Plots interactive via Direct Manipulation, and this approach feels natural.

…24 hours later, after a some GenAI help (I am not a React programmer), I have a couple of functions for integrating Declarative Dragging with Plot. Hello Draggable Plot!

https://observablehq.com/@jwolondon/draggable-plot

I’ve tried to provide comprehensive documentation and examples, as one of the only shortcomings of the D2 site is relative lack of programming documentation.

I am excited to be able to integrate Direct Manipulation into Plot, and welcome feedback / suggested changes for this API and documentation.