color(1)// "red" equivalent in the rgb() or rgba() syntax
color(0.5)// representation of an intermediate color, half-way between the start and end values
ramp(color)
d3.interpolate(0,100)(0.3)
transform=d3.interpolate(
"translate(0,0) rotate(0)",
"translate(950,10) rotate(90)"
)
transform(0)
transform(t)
d3.interpolate([1.78,3.33,2.1],[1.64,1.2,0])(t)
d3.interpolate(
{
model:"A98",
price:99.9,
dimensions:[1.78,3.33,2.1],
shoes:{size:9}
},
{
model:"F242",
price:299.9,
dimensions:[1.64,1.2,0],
shoes:{size:11.5}
}
)(t)
d3.interpolate("red",10)(0.5)
d3.interpolate(10,"red")(0.5)
d3.interpolateRgb("red",10)(0.5)
d3=require("d3-interpolate@2")
import{ramp}from"@mbostock/color-ramp"
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.