Circle Gradient II
✓ Published0🌍 Public
EEfratVil
Last edited Jul 22, 2016
Created on Jul 22, 2016
A single circle is centered on a blank SVG canvas, its fill defined by a radial gradient that transitions through three color stops. The gradient’s stops are mapped to a linear scale with a domain from -1 to 1, using the color range [#d73027, #e0e0e0, #4575b4]. This creates a smooth transition from red to light gray to blue. The example uses D3 v4’s `d3.scaleLinear` to map the domain values to the color range, and the SVG `radialGradient` definition to apply the gradient to the circle’s fill.
AI-generated descriptionCircle Gradient with Linear scale