Lens reference line that scales with bucket/window size

Hi - I'd like to add a static reference line to my Kibana Lens visualization, but I'd like the line to scale based on the bucket/window size.

For example, I'd like to set the reference line to 1,000 per minute. If the window size is 1 minute, the line should display at 1,000. If the window size is 5 minutes, the line should display at 5,000.

Thanks!

Hi @dpotter

you could use Lens formula for the reference line and write something like:

1000 * time_range() / 1000 / 60

time_range() is returning the current time window in ms, so need to convert it to minutes

1 Like