Platform
Resources
Pricing
Sign in
Get started
Huy Nguyen
Workspace
Fork
Published
By
Huy Nguyen
Edited
Jul 30, 2020
Fork of
Scroll testing
Insert cell
md
`# Scroll testing`
Insert cell
descriptions
=
d3
.
range
(
0
,
5
)
.
map
(
d
=>
"Section "
+
d
)
Insert cell
{
window
.
addEventListener
(
"resize"
,
(
)
=>
{
mutable
fullHeight
=
window
.
innerHeight
mutable
sectionHeight
=
window
.
innerHeight
}
)
}
Insert cell
mutable
fullHeight
=
100
Insert cell
mutable
sectionHeight
=
100
Insert cell
Insert cell
style
=
html
`<style>
.section {
height: ${
sectionHeight
}px;
}
.section:last-of-type {
height:${
fullHeight
}px;
}
</style>`
Insert cell
d3
=
require
(
"d3"
)
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
Compare fork
Fork
View
Export
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
descriptions
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fullHeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sectionHeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
style
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML