Skip to content

Latest commit

 

History

History
44 lines (24 loc) · 2.09 KB

query_expansion.md

File metadata and controls

44 lines (24 loc) · 2.09 KB

How to extend the query range

This document will guide you through the steps to create a plot that "extends beyond" the time range you originally want to view. This allows the line plot of the values to reach all the way to the edges of the chart. This comes in handy when plotting "slow" values (e.g. manually set values) together with "fast" ones.

Scenario

You want to plot these channels over the week starting on 2021-10-25:

  • ABK1:STA:1
  • ABK2:STA:1

Step-by-step instructions

Step 1: Select the channels for plotting

Open databuffer UI in your browser and search for ^ABK.*:STA:1$. From the search results select these channels:

  • ABK1:STA:1
  • ABK2:STA:1

Click on button plot selected plot selected to change to the plot view.

Step 2: Select time range

On the plot view, check if the text fields for Start and End are displayed:

plot range

If they are not currently displayed, click the select plot range tool button select plot range.

Enter the start time 2021-10-25 and the end time 2021-10-31 23:59:59.999. Click on the plot button plot button and wait for the plot to be displayed.

plot without query expansion

Please note, how there are gaps to the left and right of the displayed plot. This is because, within the time range requested, the first and last data points are "far away" from the actual start and end time.

Step 3: Turn on query expansion

Turn on the query expansion switch query expansion switch, click the plot button again, and wait for the updated plot to be displayed.

plot with query expansion

Please note, how now there are no gaps to the left and right. The query expansion feature of Data API has provided the last data point before the start time, and the next data point after the end time, so the line plot could be continued all the way to the edges.