Elasticsearch - Time Series

Time series is a representation of sequence of data in a specific time sequence. For example, the data for each day starting from first day of the month to the last day. The interval between the data points remains constant. Any data set which has a time component in it can be represented as a time series.

In this chapter, we will use the sample e-commerce data set and plot the count of the number of orders for each day to create a time series.

Time Series Visualize

Choose Metrics

First, we choose the index pattern, data field and interval which will be used for creating the time series. From the sample ecommerce data set we choose order_date as the field and 1d as the interval. We use the Panel Options tab to make these choices. Also we leave the other values in this tab as default to get a default colour and format for the time series.

Panel Options

In the Data tab, we choose count as the aggregation option, group by option as everything and put a label for the time series chart.

Data Tab


The final result of this configuration appears as follows. Please note that we are using a time period of Month to Date for this graph. Different time periods will give different results.

Result Time Series