-
Notifications
You must be signed in to change notification settings - Fork 53
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
Feature fill-left #87
base: master
Are you sure you want to change the base?
Conversation
query datasource to get the initial distinct point
when do we see this in the addon? version? |
@ryantxu What is your opinion? I tested the feature also with postgres datasource and it worked nicely. What do you think? Is it to hacky? Is there a better solution for the problem? |
What about an (influx) query like
This works regardless how old the last datapoint before the timerange is and without patching. Ideally, the panel would do this automatically though. The trick is to select from two subselects, one for the last datapoint before timerange and the other one for the actual query. |
For me, it didn't solve #69 with InfluxDB |
For me as well didn't solve 69 i'm using MS SQL, but yes some sort of fill-left option would be nice. |
Is there some update on this PR? Any sort of left-fill option would help using the panel for many users. |
I worked around this by using JSON datasource plugin as middleware which simply inserts the last() left datapoint right at the beginning of the timerange. This also offers a lot more possibilities constructing recordsets for your graphs. This panel plugin is dead IMO, no updates since a year or so! |
Now the initial state can be taken into account at the left side of the time bar. It is necessary if you want to display the correct fractions of states over, for example one week.
It is a bit against the conventions of grafana. After getting the data for the chosen time range into the panel it starts a second query to fetch the last values before the original
from
time point for all measurements. This point will be added as firstDistinctPoints
with the timestamp set tofrom
.The time for the secound query to look in the past can be configured in the options:
I removed the old function
applyPanelTimeOverrides()
. It never gets called because it's no method of the panel any more.This should solve Issue #69
I tested only with Influxdb as data source and it seems to work quite good. But it should also work with other data sources.