Platform
Resources
Pricing
Sign in
Get started
Olivia Vane
Data visualisation design + code. Interactive data journalist @TheEconomist
Workspace
Fork
Published
By
Olivia Vane
Edited
Oct 5, 2020
9 stars
Insert cell
Insert cell
Insert cell
Insert cell
{
button
;
const
p
=
d3
.
select
(
DOM
.
element
(
"p"
)
)
;
let
ticker
=
d3
.
interval
(
elapsed
=>
{
p
.
text
(
elapsed
)
;
if
(
elapsed
>
ticker_value_stop
)
ticker
.
stop
(
)
;
}
,
tickDuration
)
;
return
p
.
node
(
)
;
}
Insert cell
{
button
;
const
p
=
d3
.
select
(
DOM
.
element
(
"p"
)
)
;
let
ticker
=
d3
.
timer
(
elapsed
=>
{
p
.
text
(
elapsed
)
;
if
(
elapsed
>
ticker_value_stop
)
ticker
.
stop
(
)
;
}
,
tickDuration
)
;
return
p
.
node
(
)
;
}
Insert cell
Insert cell
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
button
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ticker_value_stop
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tickDuration
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML