Shuffle blocks
✓ Published0🌍 Public
PPatrick Wojda
Last edited Jun 11, 2018
Created on Jun 8, 2018
Eight colored blocks, each labeled with a Swedish party abbreviation, shuffle through a three-by-three grid before returning to their original positions. The animation alternates between a forward sequence and a backward sequence after an initial delay. Built with D3 v4, the code selects SVG groups containing rectangles and text, applying `transition.attr` with `duration` and `delay` to update each block's `transform` attribute. The data consists of a hardcoded array of party codes, with movements defined as index, row, and column targets.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed