Platform
Resources
Pricing
Sign in
Get started
Alex Garcia
Software engineer, available for freelance work! • he/him/his
Workspace
Fork
Published unlisted
By
Alex Garcia
Edited
Oct 21, 2020
1 star
Insert cell
Insert cell
import
{
View
}
from
'@mbostock/synchronized-views'
Insert cell
Insert cell
viewof
brokenNum
=
new
View
(
30
)
Insert cell
displayBroken
=
html
`${
brokenNum
} ${
viewof
brokenNum
.
bind
(
html
`<input type=range min=0 max=30>`
)
}`
Insert cell
Insert cell
viewof
num
=
new
View
(
20
)
Insert cell
display
=
{
const
root
=
html
`<span id=num></span> ${
viewof
num
.
bind
(
html
`<input type=range min=0 max=30>`
)
}`
;
return
Object
.
assign
(
root
,
{
update
:
num
=>
(
root
.
querySelector
(
'#num'
)
.
innerText
=
num
)
}
)
;
}
Insert cell
update
=
display
.
update
(
num
)
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
title
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
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
brokenNum
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
displayBroken
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
num
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
display
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
update
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML