# Ask your data — Detent

> Ask a question and get one line that answers it over a chart with one series in colour. Ask a follow-up and the same chart reshapes instead of starting over.

Canonical: https://detentui.com/components/askchart
Last updated: 2026-11-10

## About

Ask a question and get one line that answers it over a chart with one series in colour. Ask a follow-up and the same chart reshapes instead of starting over.

## Details

- The answer comes first, in one line that names what it found in the chart’s one colour, so the line is its own legend.
- One series stands full and carries its values; the others recede into slim grey, there for context and read by pointing. The answer can name it, or it’s the first one the headline mentions.
- No axis to decode and no gridlines, just the numbers on the marks. Compare two lines and the gap between them is filled.
- Follow-ups reshape the same chart: bars that stay slide and widen into their new places, bars that go sink to the baseline, new ones rise, and the scale glides to fit.
- Four kinds from the same marks: bars, stacked, dots and lines. The answer picks one; a switch lets anyone reshape it.
- Every question stays in a trail above the chart. Press one and its chart comes back, reshaping again.
- The query behind any answer unfolds in place, so people can check how a number was made. Bring any model or text-to-SQL: one function turns a question into categories and series.

## Keyboard shortcuts

| Keys | Action |
| --- | --- |
| ↵ | Ask the question |
| Tab | Reach the trail and the query |

## Install

```bash
npx shadcn add https://detentui.com/r/askchart
```

## Related
- [All components](https://detentui.com/components)
- [Pro](https://detentui.com/pro)
