oefening scales
✓ Published0🌍 Public
GGeoJonna
Last edited Feb 23, 2018
Created on Feb 23, 2018
Four horizontal bars illustrate linear scaling in D3.js v4. Each rectangle’s width maps a value from the fixed data array `[120,40,5,100]` through a `d3.scaleLinear` domain to a pixel range, while a second `d3.scaleLinear` interpolates fill color from red to blue across the same values. The SVG canvas is 500 by 500 pixels, with bars stacked at 100-pixel intervals. This example demonstrates how a single quantitative scale can drive both geometry and color encoding.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed