Skip to main content
Using Sample Data: The examples on this page use fields from our sample dataset. Download it and create an evaluation with it to follow along with this tutorial.
Histogram Widget Example

When to Use

Use histogram widgets to:
  • Show value distributions (groups data by distinct values)
  • Visualize frequency counts or aggregated metrics
  • Identify patterns in numerical data
  • Display aggregated data in a distribution format

Configuration

Required Fields

string
required
Widget display name shown on the dashboard
string
required
Must be set to “histogram”
object
required
SeriesQuery selecting the column

X-Axis Configuration (One Required)

You must provide either x_column or x_column_group, but not both:
string
Single column name to group by for the x-axis. The histogram displays distinct values from this column.Example: "overall_score" - groups by each score value (75, 80, 85, etc.)
string[]
Array of column names used to form one composite x-axis category per distinct combination of values.Example: ["agent_name", "overall_score"] - creates a category for each agent and score combination.Multiple numeric aggregation columns in the query create separate series. Use config.stacked to display those series as stacked or adjacent bars.

Optional Config Fields

boolean
default:"true"
Controls whether multiple numeric aggregation series are stacked or shown as adjacent bars.
  • true (default): Stack distributions on top of each other
  • false: Show distributions as side-by-side bars for easier comparison
boolean
default:"false"
When true, each bar’s value is rendered directly on the chart so you don’t have to hover to read it.Value labels apply to single-series histograms only (those with one aggregation). They are ignored on multi-series histograms, which use a legend instead.

Query Requirements

Histogram widgets require a SeriesQuery with:
  • Select the column you want to group by (becomes the x-axis)
  • Select an explicit aggregation (COUNT, SUM, AVG, etc.) for the y-axis in API or SDK queries
  • If you don’t add an aggregation, the UI adds COUNT(*). The API doesn’t: a query without an aggregation returns the raw rows
  • Can include filter to narrow the dataset

Creating in the UI

1

Open Widget Creator

From your dashboard, click “Add Widget” and select “Distribution”
2

Enter Title

Give your histogram a descriptive name (e.g., “Score Distribution”)
3

Select Column

Choose the column to group by (this will be the x-axis)
4

Add Aggregations (Optional)

Histogram Aggregation Builder
Add aggregations for the y-axis. If none specified, COUNT is used by default.
5

Add Filters (Optional)

Histogram Filter Builder
Optionally filter to specific subsets of data
6

Show Values on Bars (Optional)

For single-series histograms, toggle Show values on bars to render each bar’s value directly on the chart. This sets config.show_value_labels.
7

Create Widget

Click “Add” to generate the histogram
Created Histogram Widget

Output Format

Histogram widgets return grouped data:
Each data point represents a distinct value from the grouped column and its corresponding count or aggregated metric.

Example Use Cases

Use Case 1: Overall Score Distribution

Visualize how overall scores are distributed across evaluation items. The explicit COUNT aggregation below counts items for each score value.
Overall Score Distribution Histogram

Use Case 2: Technical Task Score Distribution

Show distribution for evaluations in the technical category only.
Technical Task Distribution

Use Case 3: Comparing Distributions Across Categories

Compare average fluency and relevance at each overall score using stacked bars. Set stacked to False in Python or false in JSON for adjacent bars.
Grouped Histogram Comparing Agents

Stacked vs Grouped Distributions

When comparing distributions across groups, you can control visualization style:

Grouped Distributions (Unstacked)

Grouped Histogram
Multiple distributions appear as adjacent bars for each score value. Best for:
  • Comparing distribution shapes directly
  • Identifying differences in peaks and spread
  • Seeing all distributions simultaneously

Stacked Distributions

Stacked Histogram
Distributions stacked vertically to show combined totals. Best for:
  • Showing total counts across all groups
  • Part-to-whole relationships
  • When cumulative view is meaningful

Display Behavior

Histograms apply the following formatting automatically. These behaviors are built into the rendering, so there are no extra config fields to set.

Per-category colors

When a histogram has a single series and more than one bucket, each bar is given a distinct color from a rotating palette, making individual buckets easier to tell apart. Histograms with multiple series keep one consistent color per series instead, so the series stay comparable across buckets.

Humanized column names

Raw column names are converted to readable Title Case in axis labels, the legend, and tooltips (for example, overall_score becomes “Overall Score”). Aliases that already contain spaces are shown unchanged, so you can override the displayed text by aliasing a column in your query.