Show Chart
Show_Chart renders standard inline charts for simple exploratory visuals inside chat. It supports exactly 3 chart kinds: trend, comparison, and leaderboard.
When To Use
Use
trendfor ordered time or sequence data where caller-provided row order matters.Use
comparisonfor grouped vertical-bar comparisons across short categorical labels.Use
leaderboardfor a single ranked metric shown as horizontal bars.Do not use
Show_Chartfor bespoke graphics, heavy annotations, multi-panel layouts, or presentation polish. Use the shell graphics path for those cases.
Contract
Required top-level keys:
idkindrowslabelKeyseries
Optional top-level keys:
titledescriptionfullLabelKeyvalueFormatmaxItemsfootnote
Row And Series Rules
Every row must contain the field named by
labelKey.If
fullLabelKeyis provided, every row must contain that field too.Every
series.keymust exist in every row.Every
series.keyvalue must be numeric.Numeric values should be JSON numbers, not quoted strings like
"12"or text like"N/A".Validation failures should be fixed in the payload, not ignored or retried with the same shape.
Mode Behavior
trendpreserves caller-provided row order
supports 1-4 series
renders a standard line chart
does not auto-sort rows
comparisonpreserves caller-provided row order
supports 1-4 series
renders grouped vertical bars
does not stack bars
leaderboardrequires exactly 1 series
sorts rows descending by that series key
applies
maxItemsafter sortingdefaults
maxItemsto10renders ranked horizontal bars
valueFormat
valueFormatvalueFormatis an optional strict object, not a shorthand string.Use
"compact": truefor large money or count values so axes and direct value labels remain readable in compact inline cards. Hover tooltips can still expose the full value.Valid shape:
kindvalues:numbercurrencypercent
basisvalues for percent formatting:fractionunit
Minimal Examples
Trend:
Comparison:
Leaderboard:
Rendering Constraints
Best for standard inline charts in chat, not custom-designed graphics.
Large currency and count charts should use compact magnitude formatting such as
$2.4B,$844.4M, or1.2K.comparisonis best when category labels are short enough to remain readable in grouped vertical bars.leaderboardis the right inline choice for top-N ranked categories.If the chart needs custom annotations, dense long-label art direction, multi-panel layout, or presentation styling, use the shell graphics path instead of
Show_Chart.
Last updated
Was this helpful?
