New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StateTimeline: Improve display when state changes are missing (outside time window) in query result #36417
Comments
But that seems really hard for Grafana to solve. More of a query / data issue? |
But the query does not return any state for it, so Grafana does not know what state it has initially. So what more to do than render it blank? |
I will follow this request as I just saw I had submitted a duplicate - #36922 - but how this is solved mainly by the discreet plugin is by changing the |
Not very elegant - but I updated my example with a variable and then created an interval pattern to let a user choose how much further back to look for a state change:
Including something like It's certainly heavy-handed. The only thing now is that if the previous state change is really a ways back, the label values (if centered or left rather than on right) might not be displayed. But it's workable for now. I don't really know how one would dynamically "ask" the data source for previous state changes. |
another workaround:
and using a transformation to merge the data. |
@grafana/grafana-bi-squad this was on our backlog but since it's state timeline related it should probably be with you 🤽♂️ |
This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions! |
What happened:
My state timeline panel misses out the "first logical" point, and so leaves an unsightly blank space instead:
Here I'm querying an influxdb instance and "up" and "down" strings are being returned. Because of the irregular nature of when the up and down messages are recorded, an unsightly blank space is left at the start of the first row (as opposed to the second), because the "up" data point which should logically mean that this blank space is coloured green and is labelled "Up" is outside of the time window of values to be displayed.
Of course, this gets much worse when there are no changes in the current time window for a given row, in which case that row will entirely disappear, or if there are no rows display the entire panel will show "no data".
What you expected to happen:
The blank space in the first row appears green and is labelled "Up" because of the "up" data point present in the database at a short time before the start of the time window currently being displayed.
How to reproduce it (as minimally and precisely as possible):
Simply create a data set consisting of two state changes and visualize with the state timeline visualization. Then move the time window so that only the second state change is contained within. Unituitively, the period before the second state change will appear blank, instead of being labelled with the first state change.
Anything else we need to know?:
If it helps, here is the query I'm using:
Environment:
The text was updated successfully, but these errors were encountered: