Skip to content

Re-open #12097 - Merged Attempt fixing charts shrinking on certain zoom values in Chrome #12251

Open

Description

@Hartaxfr

Expected behavior

Chart are displayed with a consistent design

Current behavior

#12097

Bug still here. Set you windows zoom to 150% and chrome zoom to 90% and go to www.chartjs.org. Magic happen

Reproducible sample

https://www.chartjs.org/

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.5.1

Browser name and version

chrome latest

Link to your project

No response

Activity

  1. gbosetti commented on Sep 12, 2026

    @gbosetti

    Hi @Hartaxfr what do you think of this approach?

    Before/Bug Now/Fix
    bug.mov
    fix.1.mov
    The chart was sizing itself against its container's height, but with no fixed height, the container is just as tall as the chart, so it kept comparing against its own previous size: shrinks went through, growth never did. It now ignores the container's height when that height is only the chart's own, so it follows the container both ways

    Doc link I used for the videos:

    Link to PR: #12300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions