Marks and Channels_3_NH
✓ Published0🌍 Public
This example demonstrates marks and channels by encoding a simple array of numbers (0–6) in three different ways: as bar length, circle size, and hue. It uses d3-selection and d3-scale-chromatic’s `schemeCategory10` to map each data value to a distinct color. The visualization renders seven fixed-position elements in an SVG canvas, with the length channel using `rect` elements and the size channel using `circle` elements scaled by the square root of the data. D3’s data join (`selectAll().data().join()`) updates the marks, while the `viz.js` file selectively applies the length encoding.
AI-generated descriptionMIT Licensed