Spotlight Chart
Fill-width metric tabs that swap a Plot underneath — KPI strip plus time-series.
Default
Each tab owns its label, pre-formatted value, delta and series. formatValue receives the series id, so one formatter can handle counts, rates and durations.
Time series. Use Left and Right arrows to inspect values, Home and End for range edges, and Escape to clear.
Lower is better
Set improvementDirection to lower for metrics where down is good. The delta pill turns green when the number falls and red when it rises.
Time series. Use Left and Right arrows to inspect values, Home and End for range edges, and Escape to clear.
Best practices
When to use
- Use when three to five KPIs share one time range and choosing one should swap the chart below (analytics overview).
- Use PlotCard for a single metric with in-card range tabs, and Stat Strip for KPIs with no chart.
Behavior
- Each tab owns id, label, a pre-formatted value, an optional delta and its series. Values are strings you format, not raw numbers.
- delta is percent change. Set improvementDirection="lower" for latency, failures or handle time so a drop shows green.
- The parent owns mode, like PlotCard. There are no range tabs in the card; filter by range above it.
- Tabs are equal flex-1 cells. The active tab is white with a 1px fg bottom edge; inactive tabs are neutral-50. Do not swap in Chip or DS Tabs.
- Control value/onValueChange and reset hiddenSeries when the tab changes, so a hidden series does not carry over.
Content
- Use short labels ("Total calls", "Connect rate") and headline values that match the plotted range.
- One formatValue can branch on the series id for counts, percents and durations.
Accessibility
- Tabs use tablist/tab/tabpanel. Arrow keys, Home and End move between metrics.
- The delta pill's sign is in the text (+10%), so the meaning does not depend on color.