Histogram

A histogram shows how a single numeric column is distributed. The widget groups values into ranges (bins) and counts how many rows fall in each range.

Do not bin in SQL. Return one raw value per row (order amount, session length, age). If you GROUP BY a bucket yourself, use a bar chart instead.

Value field

valueField is the numeric column to bin.

Number of bins

  • Automatic — the widget chooses a bin count from the data.
  • Custom — you set binCount between 2 and 100.

Start with automatic. Switch to custom when you need a specific granularity (for example always 10 bins).

Example query

SELECT amount
FROM orders
WHERE account_id = :customer_id
  AND created_at >= CURRENT_DATE - INTERVAL '90 days'
  • Bar chart for already-grouped categories
  • Number for a single summary statistic