xk6-dashboard icon indicating copy to clipboard operation
xk6-dashboard copied to clipboard

Selected timeframe resets on next data refresh

Open oleiade opened this issue 1 year ago • 2 comments

Brief summary

I have noticed that when I select a timeframe by selecting it from the panel's graph directly, my selection automatically resets on the following data refresh (currently every 10s).

Here's a gif illustrating what I mean: CleanShot 2024-01-22 at 11 07 55

I select a 1-minute timeframe from the graph, it successfully updates the view to be bound in that duration, but as soon as the data displayed are refreshed, it's reset to the original timeframe (from the beginning of the test to now).

k6 version

v0.48.0

xk6-dashboard version

0.7.2

OS

MacOS

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Select a timeframe from a panel, and wait at least 10 seconds.

Expected behaviour

The panels should keep displaying the selected timeframe?

Actual behaviour

It resets to the timeframe from the beginning of the test to now.

oleiade avatar Jan 22 '24 10:01 oleiade

Grafana has a whole ton of logic around controlling scales and other configs. This fix could take a while.

ref: https://github.com/grafana/grafana/tree/main/packages/grafana-ui/src/components/uPlot/config

2Steaks avatar Jan 30 '24 16:01 2Steaks

As I see under the hoods Grafana uses same plotting library :) (uPlot)

szkiba avatar Jan 30 '24 17:01 szkiba