Skip to main content
100%

join example

✓ Published1🌍 Public
Mma-jacobs
Last edited Apr 6, 2023
Created on Apr 6, 2023

This example demonstrates a basic data join with D3.js v6, showing how an array of five numeric values becomes a set of circles in an SVG chart. Each circle’s radius is proportional to its corresponding data value, and circles with values above 30 are colored orange while others are light gray. The code uses `d3.select` and `selectAll` with `.data()` and `.join()` to bind the data to circle elements, updating the `cx`, `cy`, `r`, and `fill` attributes. The data is hardcoded as `myData`, and the rendering targets an SVG `<g>` element.

AI-generated description
MIT Licensed

Similar vizzes