From c83aca66120b0480b15b66b706eb5039cbcf5801 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Sat, 29 Oct 2022 14:30:34 -0700 Subject: [PATCH] Clarify that a special field name is required to render images in tooltips (#2570) --- altair/examples/image_tooltip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/altair/examples/image_tooltip.py b/altair/examples/image_tooltip.py index 7473b77bd..36f6c8090 100644 --- a/altair/examples/image_tooltip.py +++ b/altair/examples/image_tooltip.py @@ -3,7 +3,9 @@ ------------- This example shows how to render images in tooltips. Either URLs or local file paths can be used to reference -the images. +the images. To render the image, you must use the special +column name "image" in your data and pass it as a list to +the tooltip encoding. """ # category: interactive charts @@ -17,5 +19,5 @@ alt.Chart(source).mark_circle(size=200).encode( x='a', y='b', - tooltip=['image'] # Must be a list for the image to render + tooltip=['image'] # Must be a list containing a field called "image" )