Skip to content

fix: incorrect padding offset on health chart#121

Merged
MatteoGabriele merged 2 commits into
MatteoGabriele:mainfrom
graphieros:health-chart-overflow
May 15, 2026
Merged

fix: incorrect padding offset on health chart#121
MatteoGabriele merged 2 commits into
MatteoGabriele:mainfrom
graphieros:health-chart-overflow

Conversation

@graphieros

@graphieros graphieros commented May 15, 2026

Copy link
Copy Markdown
Collaborator

This fixes the incorrect offset calculation on the health chart, which was overflowing the first and last datapoints more and more after each day (with the current number of days to this date, the first and last datapoints were basically impossible to hover). The offset now adapts to hardcoded internals of the chart component.

Other: bump vue-data-ui to latest (no impact on our usage here, just staying fresh)

Summary by CodeRabbit

  • Bug Fixes

    • Improved dynamic padding calculations for chart rendering based on data size
    • Updated chart grid crosshair configuration for better visual consistency
  • Chores

    • Updated data visualization library dependency

Review Change Stack

@netlify

netlify Bot commented May 15, 2026

Copy link
Copy Markdown

Deploy Preview for agentscan ready!

Name Link
🔨 Latest commit d1cc13e
🔍 Latest deploy log https://app.netlify.com/projects/agentscan/deploys/6a06ad48648662000827b7b0
😎 Deploy Preview https://deploy-preview-121--agentscan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

GlobalEventsEvolution.vue now computes responsive left/right padding based on chart width and series count using a new progressionLabelOffsetX constant. The y-axis crosshair is disabled via crosshairSize: 0. The vue-data-ui dependency is updated from ^3.19.5 to ^3.19.7.

Changes

Chart Layout and Dependency

Layer / File(s) Summary
Dynamic viewBoxPadding and crosshair configuration
app/components/Chart/GlobalEventsEvolution.vue
progressionLabelOffsetX constant offsets label positioning; viewBoxPadding computed value adjusts left/right chart padding dynamically based on props.width and props.timestamps.length, with zero padding for single series. Chart config is updated to use computed padding and set grid.labels.yAxis.crosshairSize to 0.
Vue-data-ui version update
package.json
Dependency version bumped from ^3.19.5 to ^3.19.7.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • MatteoGabriele

Poem

🐰 A chart takes shape with padding wise,
Series counted, width-aware replies,
Crosshairs vanish from the grid,
Data-UI bumped—the fix is hid!
Layout flows where numbers dance.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: incorrect padding offset on health chart' directly relates to the main change: dynamic viewBoxPadding computation in GlobalEventsEvolution.vue to fix overflow issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MatteoGabriele MatteoGabriele left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

🔥🔥🔥🔥🔥

@MatteoGabriele MatteoGabriele merged commit ad8dee9 into MatteoGabriele:main May 15, 2026
6 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.

2 participants