IconResources
Visualize intelligence

Bar chart

Add a vertical or horizontal bar chart to a card.

Bar charts are effective for comparing quantities across categories. Use them when you want to highlight differences in values with clear visual contrast.

Add bar chart

Set card to type "Vega Chart".

t0 screenshot - Add pie chart

t0 Prompt

Select data in the context dropdown of the chat window.

make a bar chart

create vertical bars

convert to bar chart

Code

{
...
"mark": "bar",
"encoding": ... ,
...
}

t0 screenshot - Add vertical bar chart

Add horizontal bar chart

Use a horizontal bar chart when category labels are long or when it’s easier to scan values side to side.

t0 Prompt

make a horizontal bar chart

flip to horizontal

Code

{
...
"mark": "bar",
"encoding": {
"y": ...,
"x": ...
},
...
}

t0 screenshot - Add horizontal bar chart

Configuration options

PropertyDescription
xSets horizontal axis — typically for quantitative values (for vertical bars).
ySets vertical axis — typically for categorical values (for vertical bars).
tooltipShows values on hover.
markUse "bar" to render rectangular bars.
axis.labelAngleAdjusts angle of axis labels. Use 0 for horizontal labels.
view.strokeRemoves outer chart stroke.
autosizeEnsures the chart fits inside its container.

On this page