influxdata / influxdata/influxdb

Step interpolation with boolean data steps do not allign with points.

Open
#23,174 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
1. Get boolean data in time series and go to data explorer
2. Trend with:
`from(bucket: "my_bucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["host"] == "thing1")
|> filter(fn: (r) => r["_field"] == "valve1")
|> toFloat()`<-- to change data into 1 or 0!
3. View raw data as graph
4. customise -> options -> interpolation = step

__Expected behavior:__
See data charted with digital steps occurring where valve1 moves from true to false or vice versa (as with linear or smooth interpolation)

__Actual behavior:__
Data charted, but steps do not align with data occurrence times (see image)
NOTE: Data aligns just fine with linear or smooth interpolation.

In this image, see where data point is vs where the steps are:

![image](https://user-images.githubusercontent.com/50411536/157459887-e29e1633-c149-4dcb-bda2-de78d9265a13.png)

In this image, see where more datapoints are (couldn't screen grab all at the same time, so you get red arrows!)

![image](https://user-images.githubusercontent.com/50411536/157455464-d38ad3f1-22ca-41d7-886a-2dba2a75c822.png)

__Environment info:__
hosted by influx

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in InfluxDB Data Explorer with the provided query and compare raw timestamps against step interpolation. Trace the charting path for the interpolation option and verify the fix by confirming that each step transition occurs at the corresponding boolean data point times.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.