Skip to content

Conversation

MichaelBurgess
Copy link
Contributor

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the width calculation logic for benchmark/detection summary charts by switching from percentage-based to pixel-based width calculations. This addresses issue #945 which likely involved incorrect chart segment widths.

  • Replaced percentage-based width calculations with pixel-based calculations using container refs
  • Added dynamic re-rendering when container sizes change through useEffect and usePrevious hooks
  • Improved border handling for narrow chart segments with conditional border styling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ui/dashboard/src/components/dashboards/grouping/CheckSummaryChart/index.tsx Refactored chart width calculations from percentage to pixel-based, added container refs and dynamic sizing logic
CHANGELOG.md Added changelog entry for the bug fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pskrbasu pskrbasu merged commit fec3d2d into v1.4.x Oct 7, 2025
18 checks passed
@pskrbasu pskrbasu deleted the issue-945-summary-chart-widths branch October 7, 2025 10:11
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