line chart transition not working with svelte and d3

Viewed 232

I am trying to make a transition in a line chart using d3 and svelte.

What I want is for the line to be updated and animated to its new position. Right now, data is updated but path is not being animated.

I am quite new to svelte and maybe missing something obvious. Would be super greatful for any help!

I tried to do it with css transition, but animation does not work as well: https://svelte.dev/repl/c6ba8a2c2a83451fb86c105550cc5aa4?version=3.38.2

Here is another attempt: https://svelte.dev/repl/22b305a7c72647669987a2d95cce6eed?version=3.38.2

0 Answers
Related