Skip to content

Resolve "Charts with long label appear oversized"

Simon Knox requested to merge 48419-charts-with-long-label-appear-oversized into master

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:

  1. 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)

Screen_Shot_2018-07-31_at_5.55.26_am_copy

  1. So our clientWidth and baseGraphWidth values in graph (used to calculate height) think our graph is 50% of screen width.

Screen_Shot_2018-07-31_at_5.56.21_am_copy

  1. Points drawn to graph. If there are lots of them then width changes to 100%, but height is not updated

Screen_Shot_2018-07-31_at_5.57.18_am_copy

And height (determined by padding-bottom) remains at the value it had before

Screen_Shot_2018-07-31_at_5.57.32_am_copy

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #48419 (closed)

Edited by Clement Ho

Merge request reports