Published
Edited
Jun 30, 2019
Importers
Insert cell
Insert cell
viewof z={return allowedSlider(0,100,[3,4,50])}
Insert cell
allowedSlider = function(min, max, allowed){
const value = min;
let i = 0;
while(allowed[i+1] <= value) i++;
return slider({
value: this ? this.input.value : i, step: 1, max: allowed.length - 1,
getValue: n => allowed[n.value]
});
}
Insert cell
Insert cell
Insert cell
primesSlider({min: 0, max: 1e6, value: this ? this.value : .5e6})
Insert cell
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