Public
Edited
Sep 11, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
fisheye = function(_) {
var a = focus,
d = distortion,
left = _ < a,
min = 0,
max = width,
m = left ? a - min : max - a;
if (m == 0) m = max - min;
return (left ? -1 : 1) * m * (d + 1) / (d + (m / Math.abs(_ - a))) + a;
}
Insert cell
import {slider} from "@jashkenas/inputs"
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