influxdata / ui

UI for InfluxDB
89 stars 41 forks source link

Change graph view to match the times given for range() #6893

Open hugojmaia opened 1 month ago

hugojmaia commented 1 month ago

Using InfluxDB v2.7.6 Local hosted.

Proposal: When doing a query with a range that stops prior to now(), set the right end of the graph to that time rather than now().

Current behavior: Any query, regardless of the stop time given, will try to show values from start to now(). As shown in the picture, I've got this little function that gives me the time of the last data point entered in the table. And since the last point was given yesterday I get this comically shrunk and unusable graph display with over 90% of the graph view blank. Sem título

Desired behavior: Have the graph only show the data point returned from the query, like this: Sem título 2 That's from Grafana, however the way Grafana does things is also very undesirable, since it first needs for all data to be fully out of view before it gives me the "zoom to data" button. Or at the very least, make the time range of the graph match the time given for the range() function.

Alternatives considered: I'm working with Grafana as well, but I'm heavily questioning if it's really needed for the use case I'm currently working on. It's mainly this data vizualization problem where old data is incredibly difficult to put in full view for the user.

Use case: University final project, trying to implement something similar to Weg's cloud solution with off the shelf hardware and a fraction of the budget. Currently trying to review yesterday's readings so I can correctly show data when the user accesses the database from their phone. It seems like I could do the entire project with just InfluxDB, but this data viewing issue is going to be a problem every time the collecting system is offline. The collection system isn't expected to be running constantly.