Platform
Resources
Pricing
Sign in
Contact us
Fil
Vocateur.
Workspace
Fork
Published
Meta
By
Fil
Edited
Sep 9, 2021
Importers
25 stars
Insert cell
Insert cell
Insert cell
Insert cell
3
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fullscreen
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
cell
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Edit
Show 3 comments
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
DEFAULT_HEIGHT
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
SCREEN_HEIGHT
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
embedHeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
url
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
outside
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
embed
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML