influxdata / influxdata/chronograf

Reverse step-plot

Open
#5,606 2 comments 1 reaction 0 assignees View on GitHub
feature request needs more info
Dominant language
TypeScript
Stars
1.6k
Forks
250
Avg merge
1d 3h
Merged PRs (30d)
9

Description

The current implementation of the step-plot visualization appears to predict the future: a data point begins a new horizontal line which stays at that value, until it is obsoleted by a new value. I'd like chronograf to draw the horizontal line based on the y-position of the *next* data point instead. Whether this issue is a feature request or a bug report, depends on whether predicting the future was the intended behavior :)

Especially in the case where pulse-based output is given, for example in energy usage metering, the calculated value will generally be the average for the period that has elapsed since the previous pulse. In this case, the horizontal line's position should be determined by the data point that follows it, instead of the one preceding. Indeed this means that the last horizontal segment from the last known data point until the current point in time, can't be drawn.

In the tool that I'm migrating away from in favor of a more modern TICK stack, rrdtool, only has the "describe the past" functionality, and the sensors I'm using are incapable of predicting the future. Any value coming from them describes the preceding interval, as opposed to the value at the time of the pulse, or the interval that comes after.

Since there may be use cases where a data point does indeed describe the value from that point forward, instead of backward, it would probably be best if the behavior is made configurable.

I'm using chronograf from the Debian package, version 1.8.5-1, on Debian Buster 10.4.

Contributor guide

Open the contributing guide

Research direction

Locate the step-plot rendering entry point in Chronograf's TypeScript frontend and trace how each data point determines a horizontal segment. Check whether existing visualization tests cover step plots, then define the configurable forward- versus backward-describing behavior, including the missing trailing segment in backward mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.