influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.7k stars 3.54k forks source link

Option for graph time range to be based on returned data, not the query time range #17611

Open sanderson opened 4 years ago

sanderson commented 4 years ago

IMPORTANT

The Query Experience (QX) team will be handling any changes to v. variables and time range dropdowns. The original changes proposed below will not be implemented by the Dumplings UI team. For more information contact the PM and Eng Manager of the QX team: @garylfowler and @hralexander

Other ideas that the Dumplings UI team can pursue include but are not limited to:


Orginal Proposal: For line graphs, give users the option to set the graph time range to be based on returned data, not the query time range.

I know this was changed in https://github.com/influxdata/influxdb/issues/15908.

Current behavior: The graph is always displayed with bounds defined by v.timeRangeStart and v.timeRangeStop, which I think is a good default behavior, but there are use cases where we may want to base the visualized time range on results.

Desired behavior: I would like an option to have the returned data determine the bounds of the visualization (like it used to). Again, this should just be an option, not the default behavior.

Alternatives considered: Creating a counter in the data to use as the x-axis. The problem is that even when I select that as the metric to use for the x-axis, the graph still honors the v.timeRangeStart and v.timeRangeStop and the data isn't visualized properly.

Use case: Flux has a new experimental.alignTime() function that lets you align input tables to the same starting time making them easy to compare. This will be nice for things like month-over-month comparisons.

image

I would like the option (for the aligned graph) to have the returned results fill the width of the graph.

emilykurze commented 1 year ago

The InfluxDB University training team would like to see this feature as well. We have had to use a complicated Flux workaround in the Advanced Flux course to be able to overlay results for the same time window (in this case day over day) comparison to show seasonality patterns in the date. I think this ability could be beneficial to our users. CC: @Jayclifford345 @ALuckette

ALuckette commented 1 year ago

The Query Experience (QX) team will be handling any changes to v. variables and time range dropdowns. The changes proposed above will not be implemented by the Dumplings UI team. For more information contact the PM and Eng Manager of the QX team: @garylfowler and @hralexander

Other ideas that the Dumplings UI team can pursue include but are not limited to:

FYI @kristinarobinson @TCL735 @emilykurze @Jayclifford345

ALuckette commented 1 year ago

Related to:

https://github.com/influxdata/idpe/issues/15826