Skip to content

fix(ui): Align time series line graph with actual data points#5041

Merged
bryanhuhta merged 2 commits into
mainfrom
huhta/fix-time-series
Apr 15, 2026
Merged

fix(ui): Align time series line graph with actual data points#5041
bryanhuhta merged 2 commits into
mainfrom
huhta/fix-time-series

Conversation

@bryanhuhta
Copy link
Copy Markdown
Contributor

@bryanhuhta bryanhuhta commented Apr 9, 2026

Before this change the time series data points would render evenly across the time series graph window, regardless of whether the data point aligned with the x-axis time value.

This PR makes sure that data points are rendered above the correct time marker tick on the x-axis.


Note

Medium Risk
Changes the timeline API contract from number[] to timestamped Point[], which touches query state and chart rendering and could break downstream consumers if any were missed. Adds a new test runner and CI job, which is low functional risk but may affect pipeline stability/time.

Overview
Fixes the time series chart so points are positioned on the x-axis using their actual timestamp instead of being evenly distributed across the width, updating the area/line paths accordingly.

Updates fetchTimeline/usePyroscopeQuery/TimeSeries to pass full { value, timestamp } points through the UI rather than mapping to just values.

Introduces vitest with a new yarn test script, moves time-series helper functions into components/timeseries.ts with unit tests, and adds a test job to the frontend GitHub Actions workflow.

Reviewed by Cursor Bugbot for commit 697753d. Bugbot is set up for automated code reviews on this repo. Configure here.

@bryanhuhta bryanhuhta self-assigned this Apr 9, 2026
@bryanhuhta bryanhuhta requested a review from a team as a code owner April 9, 2026 20:39
@bryanhuhta bryanhuhta enabled auto-merge (squash) April 9, 2026 20:59
Copy link
Copy Markdown
Contributor

@aleks-p aleks-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bryanhuhta bryanhuhta merged commit f223393 into main Apr 15, 2026
34 checks passed
@bryanhuhta bryanhuhta deleted the huhta/fix-time-series branch April 15, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants