Skip to content

fix: group audit trend points by local date - #675

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/audit-trend-local-date-grouping
Aug 7, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/audit-trend-local-date-grouping

Conversation

@BharadwajKanneveti

Copy link
Copy Markdown
Contributor

Summary

Fix audit trend chart date grouping to use the user's local calendar day instead of UTC day.

Changes:

  • Replaced UTC-based date grouping using toISOString() with local date parts (getFullYear, getMonth, getDate).
  • Ensured trend points are grouped using the same calendar as the x-axis labels.
  • Fixed incorrect latest point and delta calculations caused by UTC/local date mismatches.

Related issue

Closes #668

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

Checklist

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Correct fix for #668 — the grouping key is now built from local date parts, so it uses the same calendar as the axis labels and the latest-per-day pick. Thanks!

@gkhngyk
gkhngyk merged commit 9eecf58 into ansvisor:main Aug 7, 2026
4 checks passed
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.

Site Audit: trend chart groups by UTC day but labels by local day

2 participants