[READ-ONLY] Mirror of https://github.com/ewanc26/pkgs. my pkgs monorepo docs.ewancroft.uk/projects/pkgs
monorepo nix

feat(tourmaline): add animated bar-chart race for top artists master

Precomputes one frame per month up front (running cumulative counts, snapshotted to the top 15 artists), then drives a horizontal Chart.js bar chart through the frames on a setInterval, relying on Chart.js's built-in animation to tween between frames — the standard bar-chart- race technique, no extra library. Playback (play/pause, scrubber, 0.5x/1x/2x speed) is driven by a single $effect keyed on `playing`/`speed`: the effect's cleanup clears the interval on every re-run, so pausing, changing speed, or unmounting can never leak a timer (same discipline as StoryRecap.svelte's resetAutoAdvance). Playback stops (without looping) at the last frame and the play button re-enables once the user scrubs back. Wired into the catalogue tab above the existing Top Artists list.


+233
2 changed files