Viewing a saved revision (read-only)
1d1bac544f26487c8bc93861ae5a2c7e
Marks and Channels
A small multiples grid of five D3.js plots demonstrates how the same dataset—the numbers zero through four—can be encoded through different visual channels. Each panel isolates a single mark or channel: x-position, y-position, size, length, shape, and hue, using circles, rectangles, and paths. The code uses D3’s selection and join API within a custom viz.js orchestrator, rendering SVG directly. Shape encoding leverages d3.symbol() with symbolsFill, while hue applies schemeCategory10.
AI-generated descriptionA demonstration of basic D3 usage to implement the concept of Marks and Channels. Includes usage of:
- Point Marks by X, Y, Size
- Line mark varying in length
- Scaling factors
- SVG Rectangles
selection.each()- SVG Path Elements
d3.symbol()- SVG attributes
transformandfill - D3 Color Schemes
- JavaScript Modules
Part of the Constructing Visualizations Playlist.
See also blocks.roadtolarissa.com: Marks and Channels (a vanilla JavaScript version of this).