Skip to main content
100%

Bubbles - Force bounding

✓ Published0🌍 Public
RRenan Barbosa
Last edited Apr 12, 2020
Created on Apr 12, 2020

This example demonstrates a force-directed bubble chart that packs 21 data values into a square boundary. Fixed "boundary" nodes, positioned along the top and left edges, constrain the visible data circles within the 500x500 pixel area. The visualization uses D3 v5’s `d3.forceSimulation`, combining `forceX`, `forceY`, `forceManyBody`, and `forceCollide` to repel and pack circles without overlap, while radii are scaled with `scaleSqrt`. Each bubble is rendered as an SVG circle with a white label. The simulation runs 120 ticks before rendering, and the final layout is drawn in a single frame.

AI-generated description

This is a test, the original source created by Tom Shanley in Observable

MIT Licensed

Similar vizzes