Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SVG Path

Public visualization

SVG Path

0 stars1🌍 Public
RRubens
Last edited Jan 25, 2020
Created on Dec 1, 2018

This example demonstrates SVG path drawing primitives by rendering a grid of vertical and horizontal lines using D3 v5. It creates a 10x5 lattice of green strokes on an SVG canvas with a viewBox of 100x50 units. The code uses `d3.select` to append the SVG element and `d3.range` to generate data arrays, then appends path elements whose `d` attribute strings are constructed with template literals for `M` (moveto), `V` (vertical line), and `H` (horizontal line) commands. The rendering relies entirely on SVG path syntax without additional geometry libraries.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed