Skip to main content

Time Series

Every Metric can be visualized as a Time Series. Unlike Counters, which return a single value for a time range, a Time Series returns values for every time granule over the requested time range. For example, a Time Series could represent

  • Monthly sales for the quarter,
  • Daily signups for the week, or
  • Minute-by-minute error occurrences in the last hour.

Any time you need to visualize a change in Metric over time, consider using a Time Series. If one value will do, consider using a Counter; otherwise, if you need a Metric broken down by Dimension and sorted, consider using a Leaderboard.


When building customer-facing analytics, Time Series are essential for understanding how a Metric changes over time. Most customer dashboards are centered around a time series, and any additional visualizations use a time range derived from the Time Series.

There are lots of libraries you can use to visualize Time Series. We've chosen to use Propel's open source UI Kit in the example above, but Propel is compatible with all charting libraries. If you're using React and want some inspiration, check out our blog post, Best React Charting Libraries for Data Visualization and Analytics.


You will pass a TimeSeriesInput when querying the Time Series. The most important arguments are

  1. The timeRange to query over,
  2. The time granularity to aggregate by, and
  3. The filters to use.

The Metric to Query. It can be a pre-created one or it can be inlined here.


The time range for calculating the time series.


The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.

You can set this to "America/Los_Angeles", "Europe/Berlin", or any other value in the IANA time zone database. Defaults to "UTC".


The time granularity (hour, day, month, etc.) to aggregate the Metric values by.


The Query Filters to apply before retrieving the time series data, in the form of SQL. If no Query Filters are provided, all data is included.


The query returns an array of labels and an array of values inside a TimeSeriesResponse. There is a label and value for every time granule of the requested time range.

Each label is a timestamp wrapped in a string, for example, "2023-02-01T00:00:00.000Z".

Each value is a number wrapped in a string. Using a string ensures we can support values greater than 32-bits in the GraphQL API.

labels array of StringNo

The time series labels.

values array of StringNo

The time series values.


The Query statistics and metadata.


Suppose we have a Data Pool syncing from a table of restaurant sales data. The data might look like the following:


Note: this data has essentially the same format as the TacoSoft data we used in our Quickstart.

We can create a Sum Metric named "Revenue" which sums up the sales data. By including "taco_name" and "restaurant_name " as Dimensions, we can answer questions with our Metric. Follow along for worked examples.

1. How much revenue did a particular restaurant generate?

In this example, we demonstrate how to query the total revenue for a specific restaurant, "El Buen Sabor," over a set period of time from "2023-08-03T07:00:00.000Z" to "2023-08-09T07:00:00.000Z".

query TimeSeriesExample1($input: TimeSeriesInput!) {
timeSeries(input: $input) {


"input": {
"metric": {
"sum": {
"dataPool": {
"name": "TacoSoft Demo Data"
"measure": {
"columnName": "taco_total_price"
"granularity": "DAY",
"timeRange": {
"start": "2023-08-03T07:00:00.000Z",
"stop": "2023-08-09T07:00:00.000Z"
"filters": [
"column": "restaurant_name",
"operator": "EQUALS",
"value": "El Buen Sabor"


"data": {
"timeSeries": {
"labels": [
"values": ["0", "1654.75", "4288.5", "3751", "3994", "4311", "1655.75"]

You can replicate this query on GraphQL Explorer by logging in here.

You can learn more about how to structure a Time Series query here.

2. How much revenue did a particular taco generate?

In this example, we demonstrate how to query the revenue generated by a specific taco, "Shrimp," using a relative time range for the current month.

query TimeSeriesExample2($input: TimeSeriesInput!) {
timeSeries(input: $input) {

Replicate this query in the GraphQL Explorer. More on Time Series queries here.