Platform
Resources
Pricing
Sign in
Get started
Troy Dack
Workspace
Fork
Published
By
Troy Dack
Edited
Jan 24, 2021
MIT
Importers
2 stars
Insert cell
md
`# Gauge`
Insert cell
html
`<div id="temp">${
g1
.
svg
(
)
}${
g2
.
svg
(
)
}</div>`
Insert cell
g1
=
new
Gauge
(
config
)
Insert cell
g2
=
new
Gauge
(
config
)
Insert cell
{
g1
.
redraw
(
75
)
;
g2
.
redraw
(
30
)
;
}
Insert cell
config
=
(
{
size
:
240
,
label
:
"Temp °F"
,
min
:
0
,
max
:
100
,
minorTicks
:
10
,
units
:
"°F"
,
greenZones
:
[
{
from
:
40
,
to
:
60
}
]
,
yellowZones
:
[
{
from
:
25
,
to
:
35
}
,
{
from
:
60
,
to
:
85
}
]
,
redZones
:
[
{
from
:
0
,
to
:
25
}
,
{
from
:
85
,
to
:
100
}
]
}
)
Insert cell
2
Insert cell
d3
=
require
(
"d3@v5"
)
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
g1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
g2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
config
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Gauge
Edit
Show 2 comments
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