Public
Edited
Dec 31
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
saved_state = {
const state = localStorage.getItem("gl_state");
if (state) {
return gl.LayoutConfig.fromResolved(JSON.parse(state));
}
}
Insert cell
layout.on("stateChanged", function () {
console.log("saving");
var state = JSON.stringify(layout.toConfig());
localStorage.setItem("gl_state", state);
})
Insert cell
Inputs.button("reset saved state", {
reduce: () => {
localStorage.removeItem("gl_state");
}
})
Insert cell
Insert cell
Insert cell
Insert cell
viewof slider = Inputs.range()
Insert cell
cell = function (container, component) {
const element = container.getElement().appendChild(cells.get(component.id));
}
Insert cell
light_theme_css
Insert cell
base_css
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