code: protected void drawLabelTextAndBackground(Canvas canvas, char[] labelBuffer, int startIndex, int numChars,
                                                int autoBackgroundColor) {
          final float textX;
          final float textY;
  
          if (isValueLabelBackgroundEnabled) {
  
              if (isValueLabelBackgroundAuto) {
                  labelBackgroundPaint.setColor(autoBackgroundColor);
              }
  
              canvas.drawRect(labelBackgroundRect, labelBackgroundPaint);
  
              textX = labelBackgroundRect.left + labelMargin;
              textY = labelBackgroundRect.bottom - labelMargin;
          } else {
              textX = labelBackgroundRect.left;
              textY = labelBackgroundRect.bottom;
          }
  
          canvas.drawText(labelBuffer, startIndex, numChars, textX, textY, labelPaint);
      }
docs: Draws label text and label background if isValueLabelBackgroundEnabled is true.