Better detection for showing or hiding the data labels based on whether the entire bounding box is inside the plot area. Closes #1788.