-
Just wondering if there is an example showing how to add tooltips using |
Beta Was this translation helpful? Give feedback.
Answered by
Fil
Mar 25, 2025
Replies: 1 comment 1 reply
-
In https://observablehq.com/@observablehq/plot-image-dodge you could add Plot.plot({
inset: 20,
height: 280,
marks: [
Plot.image(
presidents,
Plot.dodgeY({
x: "First Inauguration Date",
r: 20, // clip to a circle
preserveAspectRatio: "xMidYMin slice", // try not to clip heads
src: "Portrait URL",
title: "Name",
tip: true
})
)
]
}) Or, if you wanted to explicitly call Plot.tip: Plot.plot({
inset: 20,
height: 280,
marks: [
Plot.image(
presidents,
Plot.dodgeY({
x: "First Inauguration Date",
r: 20, // clip to a circle
preserveAspectRatio: "xMidYMin slice", // try not to clip heads
src: "Portrait URL",
title: "Name"
})
),
Plot.tip(
presidents,
Plot.pointer(
Plot.dodgeY({
x: "First Inauguration Date",
r: 20, // clip to a circle
title: "Name"
})
)
)
]
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
df-rw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In https://observablehq.com/@observablehq/plot-image-dodge
you could add
tip: true
:Or, if you wanted to explicitly call Plot.tip: