influxdata / influxdata/influxdb
Allow to color/emphasize horizontal (and vertical) parts of the graph
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Proposal:__
Please make it possible to change the background color of parts of the x-axis and/or the y-axis according to a query condition.
Lets say you have a time series with only two possible values: 0/1 (on/off). When the status is on, color the graph yellow, when it's off, color the graph blue.
__Current behavior:__
Currently, there is no way to achieve this.
It is possible to add a second (let's call it status) graph underneath the main graph with just distinct values, either as graph or as points, and then compare visually where the status graph changes and thus infer what the status is. Not so nice, because you cannot put words on the y-axis, so you have to know all the possible status values by heart.
__Desired behavior:__
I have a series of status values that don't change often. I want to display the system status together with the main values that are constantly changing. So I need a query that is able to interpret the binary status value with a condition (e.g. first bit, like `value & 8`, corresponds to status 1, second bit to status 2, etc.) and then define a background color for the graph while this status (the condition) is true.
__Alternatives considered:__
I would also be happy with an annotation at the point where the status value changes. The annotation would be a vertical line that can have a custom text associated (the status value interpretation).
__Use case:__
I want to monitor a battery. In the graph with currents and voltages, I want to see when the battery is discharging or charging and how. The best solution for that is to assign a color to charging, float charging, boost charging, or discharging and display that as the background color of the relevant part of the graph.
Contributor guide
Research direction
The issue names no files or tests. Start by locating the graph-rendering entry point and reviewing how query results and axis regions are handled; done should mean condition-based background colors or status annotations can be displayed alongside the main time series.
Written by the indexing model from the issue text.
Assessment
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100