Skip to main content
100%

D3 Shapes - Star shaped scatter plot

✓ Published1🌍 Public
SSubhendu Karmakar
Last edited Dec 29, 2023
Created on Dec 28, 2023

Six points, plotted along the x-axis from 0 to 500, each render as a hollow, gray star symbol. The visualization demonstrates D3’s `d3.symbol()` generator with the `d3.symbolStar` type and a fixed `size(80)`, applied as the `d` attribute for every SVG `<path>`. All stars share the same path data, and their positions come from a hardcoded `points` array, translated via each datum’s coordinates. The example uses a static SVG container with a `g` element, showing how a single generated symbol can be reused through D3’s data join.

AI-generated description

D3 Scales - scaleTime()

MIT Licensed

Similar vizzes