Skip to content

fix(#5307): make the LineChart component have a proper parent width#5346

Merged
SteKoe merged 2 commits into
codecentric:masterfrom
cdprete:fix/5307
May 15, 2026
Merged

fix(#5307): make the LineChart component have a proper parent width#5346
SteKoe merged 2 commits into
codecentric:masterfrom
cdprete:fix/5307

Conversation

@cdprete
Copy link
Copy Markdown
Contributor

@cdprete cdprete commented May 9, 2026

Partially fixes #5307.

The issue still occurs, as it can be seen below:
image

but it's way less evident than the previous one shown in #5307 (comment).

It's like, on rendering, it can't detect the width of the parent properly (by a small margin) when it's added to the DOM by opening the accordion, in constrast with when it's already in the DOM to begin with.
I was considering to try with resizeDelay but I don't know how much it's worthy.

@cdprete cdprete requested a review from a team as a code owner May 9, 2026 06:50
@cdprete cdprete force-pushed the fix/5307 branch 8 times, most recently from 2ebbd90 to 2c07af9 Compare May 15, 2026 11:22
@SteKoe
Copy link
Copy Markdown
Contributor

SteKoe commented May 15, 2026

Hi,

I switched to grid instead of flex box in instances/details view which enforces a fixed column width of 50%. This also forces chart.js to render the width for charts as expected. Since the option to maintain aspect ratio leads to decreased height of charts, I disabled this as well. Now, when resizing the window, charts are drawn nicely and the respective containers do not exceed their boundaries and lead to nasty layouting.

@SteKoe SteKoe merged commit cdf2619 into codecentric:master May 15, 2026
1 check 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.

Bug: View loses alignment when one or more graphs are open

2 participants