Skip to content

Conversation

@Bouhnosaure
Copy link

Description

Add height control for chart widgets

In V3, full-width widgets displayed correctly by filling the entire screen. In V4, they are too slim and barely readable.

Adding a height property would allow proper control over widget display and ensure readability.

Visual changes

V3

image

V4

image

V4 + Height

image

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin
Copy link
Member

Please share a reproduction repository for this before I merge, as I cannot reproduce the problem myself.

@danharrin danharrin added the bug Something isn't working label Jan 15, 2026
@danharrin danharrin added this to the v4 milestone Jan 15, 2026
@danharrin danharrin added enhancement New feature or request needs more info and removed bug Something isn't working labels Jan 15, 2026
@Bouhnosaure
Copy link
Author

Please share a reproduction repository for this before I merge, as I cannot reproduce the problem myself.

You can reproduce the behavior here : https://github.com/Bouhnosaure/filament-height-test

To quickly reproduce the PR, after installing the project and creating your user, go to the homepage there will be the widget.

Then here vendor/filament/widgets/resources/views/chart-widget.blade.php at the line 82 just add just above the max-height style property:

'height: ' . $maxHeight => filled($maxHeight),

Reload, you'll see the difference in readability.

Thanks !

@Bouhnosaure
Copy link
Author

Before
Capture d’écran du 2026-01-15 17-28-54

After
Capture d’écran du 2026-01-15 17-29-01

@marvinrabe
Copy link

@danharrin When setting the maxHeight we have the same problem with charts. What is specified in maxHeight is for some reason ignored and the chart gets squished into a very little stripe. Way way smaller than what would be allowed with the maxHeight setting. When leaving the maxHeight it will be bigger, but because it just fills space it might end up way to big.

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

Labels

enhancement New feature or request needs more info

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants