Skip to main content
100%

d3 test

✓ Published0🌍 Public
Aadelaide01
Last edited Mar 28, 2020
Created on Mar 28, 2020

A small SVG canvas displays three abstract shapes: a darkblue circle, an orange square, and a crimson star, each positioned at different vertical offsets. The code defines a custom `shapemaker` function that appends the appropriate SVG element based on a `shape` property from a data array. It uses d3.v5’s selection and data binding, with `d3.symbol` and `d3.symbolStar` for the star path, and hardcoded fallback attributes for position and size when data values are missing.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes