Statistic
This section explains how to create statistic dashboard elements and add them to your dashboard.
Statistics dashboard elements display a summary of the selected metrics over a given time period. For example, you can use a statistic dashboard element to show the average, sum, min, max, and count of response times or error counts.
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Send data to your Axiom dataset.
- Create an empty dashboard.
Create a dashboard element
- In the sidebar, click Dashboards and open the dashboard to which you want to add the statistic.
- Click Edit dashboard.
- Click Add element in the top right corner.
- Select Statistic from the Add element menu (under Chart > Chart aggregation or Data).
- Choose one of the following:
- Click Builder to create your chart using a visual query builder. For more information, see Create chart using visual query builder.
- Click Editor to create your chart using the Axiom Processing Language (APL). Create a chart in the same way you create a chart in the Editor.
- Optional: Configure the dashboard element.
- Click Save.
The new element appears in your dashboard. In the page header, click Save dashboard to save your changes to the dashboard.
Example with Builder
Select sample-http-logs and add the avg(req_duration_ms) aggregation. In the chart settings, enable Line chart to show how the average request duration changes over time.

Example with APL
Use bin_auto(_time) to return values over time for the line chart.

Settings
Use the settings panel on the right to configure the statistic element:
- Chart > Line chart: Display a sparkline showing values over time alongside the summary value.
- Value > Custom units: Display a unit after a plain number (for example,
4.7with%shows4.7%), or replace a unit parsed from a text value (for example,5GBwithGiBshows5GiB). If the value already shows its own unit (a duration, or a value whose field unit is bytes, percent, or currency), custom units don't apply and Axiom keeps the saved setting. To use your own unit, convert the value to a plain number in the query first (for example,duration / 1ms), then set Custom units. - Value > Decimal places: Set the number of decimal places to display.
- Theme > Theme and Background: Choose the color theme and background style.
- Y-axis > Scale and Zero: Set the vertical axis scale for the line chart and whether to include zero.