IconResources
Visualize intelligence

Tooltips

Add a tooltip to display additional information on hover.

Tooltips display contextual details when a user hovers over a chart element. They are useful for showing precise values, category labels, or any additional metadata without crowding the visual.

Add tooltips to a chart

You can add tooltips to any mark in Vega-Lite by using the tooltip encoding channel. Tooltips support one or more fields and automatically follow formatting based on field type.

t0 Prompt

Select data in the context dropdown of the chat window.

make a bar chart with tooltips

show value and category on hover

add hover labels

Code

{
...
"mark": "bar",
"encoding": {
...
"tooltip": [...]
},
...
}

t0 screenshot - Add card

Configuration options

PropertyDescription
tooltipDefines the fields shown in the tooltip.
fieldSpecifies the data field to show.
typeEnsures correct formatting: use quantitative, nominal, or temporal.
title(Optional) Overrides default tooltip field name.
autosizeEnsures the chart fits inside its container.
view.strokeRemoves outer border for cleaner display.

On this page