Skip to main content
100%

D3Trial

✓ Published1🌍 Public
Ffdrigui
Last edited Oct 13, 2023
Created on Oct 13, 2023
Forked from HTML Starter

This example uses D3 version 6.6.1 to generate a grid of 100 horizontal and 100 vertical rectangles, each 10 pixels thick, that span the full width and height of the browser window. Two SVG masks create a circular cutout effect: the first mask, using a white circle on a black background, hides the horizontal bars outside a 200-pixel-radius circle centered on the screen, while the second mask, with inverted colors, shows only the vertical bars inside the same circle. The result is a contrasting composition of crossing lines, where the horizontal and vertical strokes meet within the circle’s boundary. The code uses `d3.select`, `d3.range`, and the `.join()` method to bind data to SVG elements.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes