Skip to main content
100%

Re-create Marks & Channels Graphic

✓ Published0🌍 Public
RRainismZ
Last edited Sep 27, 2017
Created on Sep 27, 2017

Four simple SVG shapes—a cross, circle, square, and triangle—stand in a diagonal line, each rendered as a symbol from D3's `d3.symbol()` API. The shapes demonstrate distinct mark types using the `d3.symbolCross`, `d3.symbolCircle`, `d3.symbolSquare`, and `d3.symbolTriangle` generators. Each path is positioned via a `transform` attribute that calculates x-coordinates from an array index and adds a slight vertical offset, while a fixed `size` of 50 by 50 keeps them uniform. The code binds the data array with `selectAll` and `enter`, then applies attributes using `attrs` from d3-selection-multi, running entirely with D3 v4 in an SVG container.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes