Platform
Resources
Pricing
Sign in
Get started
Melissa Iori
Workspace
Fork
Public
By
Melissa Iori
Edited
Feb 14, 2023
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
rectY
(
olympians
,
Plot
.
binX
(
{
y
:
"count"
}
,
{
x
:
"weight"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
color
:
'#ff0f0f'
}
)
Insert cell
viewof
form1
=
Inputs
.
form
(
{
a
:
Inputs
.
range
(
[
0
,
50
]
,
{
label
:
"a"
,
step
:
1
}
)
,
b
:
Inputs
.
range
(
[
0
,
50
]
,
{
label
:
"b"
,
step
:
2
}
)
}
)
Insert cell
viewof
n2
=
html
`<input type="range" min="0" max="100" step="2">`
Insert cell
viewof
form2
=
{
const
input
=
html
`<input type="range" min="0" step="1">`
;
function
inputted
(
)
{
input
.
max
=
viewof
n2
.
value
;
}
viewof
n2
.
addEventListener
(
"input"
,
inputted
)
;
invalidation
.
then
(
(
)
=>
viewof
n2
.
removeEventListener
(
"input"
,
inputted
)
)
;
inputted
(
)
;
return
input
;
}
Insert cell
calc
=
yield
Promises
.
delay
(
200
,
form1
.
a
+
form1
.
b
)
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
form1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
n2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
form2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
calc
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