Skip to main content
100%

Store constraining + click to zoom

✓ Published1🌍 Public
CCalvin Gomez
Last edited May 19, 2020
Created on May 19, 2020

A d3.pack layout renders a hierarchical dataset of store regions as nested circles, with color encoding indicating whether each node is customer-capacity-constrained. Clicking a circle triggers a d3.zoom-like transition that scales and translates the view to center that node, with a second click restoring the original zoom level. The data is loaded from JSON, and the tree is flattened via `root.descendants()`. SVG circles and text labels are animated using `transition.attr` on the group element, with stroke width adjusted inversely to the zoom factor.

AI-generated description
MIT Licensed

Similar vizzes