Resolve "Charts with long label appear oversized"
What does this MR do?
Fix graph height on by forcing a render update (redraw) after drawing the graphs for the first time.
Are there points in the code the reviewer needs to double check?
There may be a better/cleaner way to fix this. Kinda felt like the fix should be in graph.vue, but we cannot detect element width changing
Screenshots (if relevant)
What was happening:
- When 2 graphs are rendered, they start with no content. This means they have a min-width of 450px and are rendereed side-by-side (see
min-width
value)
- So our
clientWidth
andbaseGraphWidth
values in graph (used to calculate height) think our graph is 50% of screen width.
- Points drawn to graph. If there are lots of them then width changes to 100%, but height is not updated
And height (determined by padding-bottom
) remains at the value it had before
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a Frontend maintainer
-
-
Conforms to the merge request performance guidelines -
Conforms to the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #48419 (closed)
Edited by Clement Ho