Published
Edited
Feb 6, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//ticks that are within the ball radius are moved down.
displaceScale = d3
.scalePow(
[0, BALL_HEIGHT / 2],
[DEFAULT_POSITION, DEFAULT_POSITION - BALL_HEIGHT / 2]
)
.exponent(2)
.clamp(true)
Insert cell
visualizeScale(displacementScale)
Insert cell
visualizeScale(displaceScale)
Insert cell
displaceScale((EMPHASIS_LENGTH / 2) * Math.random())
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
BALL_HEIGHT = 46
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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