Published
Edited
Sep 9, 2021
Importers
25 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
DEFAULT_HEIGHT = Math.min(SCREEN_HEIGHT, width * 0.7) | 0 // set to the height you want in observable
Insert cell
SCREEN_HEIGHT = screen.height // capture screen height before obs goes fullscreen
Insert cell
embedHeight = {
const el = document.body.appendChild(
html`<div style="position:absolute;top:0;left:0;width:0;height:100%;visibility:hidden">`
);
invalidation.then(() => el.remove());
return () => el.clientHeight;
}
Insert cell
url = new URL(document.location)
Insert cell
outside = !url.host.endsWith(".observableusercontent.com")
Insert cell
embed = !outside && url.searchParams.has("cells")
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