Published
Edited
Sep 9, 2021
1 star
Insert cell
Insert cell
viewof boxWidth = Inputs.range([0, 1], {label: "Box width"})
Insert cell
htl.html`<svg width=${width} height=${height}>
<rect width=${width} height=${height} fill="hsl(216deg 20% 90%)"/>
<!--<rect width=${boxWidth * width} height=${height} fill="hsl(216deg 100% 13%)"/>-->
<rect width=${boxWidth * width} height=${height} fill="hsl(${boxWidth==1?'116deg':'216deg'} ${boxWidth * 100}% 75%)"/>
</svg>`
Insert cell
height = 100
Insert cell

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.
Learn more