Skip to content

faces/pie: Ensure text doesn't overflow the face

Arjen Hiemstra requested to merge work/ahiemstra/piechartmin into master
  • faces/pie: Ensure text doesn't overflow the face

This ensures the text for total sensors doesn't overflow the face, using a few tricks. Most prominently, this based hiding/showing decisions on multiples of line height. This makes showing/hiding a little less arbitrary and more based on relevant values. It also enables wrapping to two lines for the primary value display, which will (usually) push the unit symbol to its own line when the face gets very small. Finally, if we determine there is no way to fit the text, we hide it completely rather than letting things overflow.

BUG: 453797

Merge request reports

Loading