ONSvisual / svelte-charts

Reusable chart templates for Svelte projects.
14 stars 6 forks source link

Gridlines that transition #1

Closed henryjameslau closed 2 years ago

henryjameslau commented 3 years ago

Can you get the axis and gridlines to transition too

jtrim-ons commented 3 years ago

That would be cool! I did a bit of Googling and didn't come across any examples of people doing this with LayerCake or Svelte. Maybe the easiest way would be to add all the tick marks that you might possibly need ahead of time, then show/hide the one you need when you animate it???

bothness commented 2 years ago

@henryjameslau I figured out an approach to this on the latest version. Basically if you tween the extents of xDomain or yDomain, then the xScale/yScale function also gets tweened, so the axes get tweened for free.