Are animated transitions possible using D3's General Update Pattern?

Hi, I’m attempting to achieve an animated transition with a beeswarm plot in Observable using D3’s general update pattern. I’ve used this example as a starting point but have so far been unsuccessful.

Here’s a link to my current code: https://beta.observablehq.com/d/43c11a3ecf359efc

Yes, but you’re missing a merge. See https://beta.observablehq.com/d/bf2b4ae6a921e382. The transitions work, but not always. Sometimes I get “TypeError: el.circles.data is not a function” which also happens with your unmodified code. Hopefully you can figure out why. My time’s up for today.

thanks I’ll take a look at your modification

I’m still not sure exactly why your original didn’t work, but here is my shot at it:

1 Like

I’ll add that @Fil came up with this solution as well:

You might want to use radio buttons / slider, instead of select menus.