influxdata / influxdata/influxdb
Step interpolation with boolean data steps do not allign with points.
- 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:

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

__Environment info:__
hosted by influx
Contributor 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