From 29eef139bc9f0914b3775dec0edbc67aa3108762 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Tue, 22 Mar 2022 16:04:16 -0700 Subject: [PATCH] Clarify that a special field name is required to render images in tooltips --- 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 9b818c6f7..f831d774a 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: other 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" )