VSA correct the date range tooltip

Summary

Stage time chart returns unrealistic data for charts. Live example from production: image

Graphs show that average time to complete "Plan" stage for issues created on June 23, 2022 is 128 days. So on average this stage is finished around end of October 2022 which can't happen because today is July 19 2022.

The API returns quite big number:

image

Example Project

https://gitlab.com/groups/gitlab-org/-/analytics/value_stream_analytics?created_after=2022-06-20&created_before=2022-07-19&value_stream_id=1341&stage_id=4186&sort=end_event&direction=desc&page=1

What is the current bug behavior?

The API returns unrealistic time periods to complete a stage.

What is the expected correct behavior?

Correct average stage completion times are rendered.

Implementation Plan

Stage chart data is actually correct, but the tooltip is misleading. image

Instead of

Showing data for workflow items created in this date range. Date range limited to 180 days.

it should state

Showing data for workflow items completed in this date range. Date range limited to 180 days.

/cc @ahegyi @hsnir1

Edited by Ezekiel Kigbo