Restructure code to create label within graph pane

- Make separate function 'getLabelBodyWithinBounds' to bring label body
  within bounds.