code: @Override protected void resizeDynamicText() {
          double maxWidth = unitText.isVisible() ? width - size * 0.275 : width - size * 0.1;
          double fontSize = size * 0.12;
          valueText.setFont(Fonts.latoRegular(fontSize));
          if (valueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(valueText, maxWidth, fontSize); }
  
          maxWidth = width - size * 0.7;
          fontSize = size * 0.06;
          averageText.setFont(Fonts.latoRegular(fontSize));
          if (averageText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(averageText, maxWidth, fontSize); }
          if (averageLine.getStartY() < graphBounds.getY() + graphBounds.getHeight() * 0.5) {
              averageText.setY(averageLine.getStartY() + (size * 0.0425));
          } else {
              averageText.setY(averageLine.getStartY() - (size * 0.0075));
          }
  
          maxWidth = width - size * 0.25;
          fontSize = size * 0.06;
  
          boolean customFontEnabled = tile.isCustomFontEnabled();
          Font    customFont        = tile.getCustomFont();
          Font    font              = (customFontEnabled && customFont != null) ? Font.font(customFont.getFamily(), fontSize) : Fonts.latoRegular(fontSize);
  
          text.setFont(font);
          if (text.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(text, maxWidth, fontSize); }
          text.relocate(width - size * 0.05 - text.getLayoutBounds().getWidth(), height - size * 0.1);
  
          maxWidth = width - size * 0.25;
          fontSize = size * 0.06;
          timeSpanText.setFont(Fonts.latoRegular(fontSize));
          if (timeSpanText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(timeSpanText, maxWidth, fontSize); }
          timeSpanText.relocate((width - timeSpanText.getLayoutBounds().getWidth()) * 0.5, height - size * 0.1);
      }
docs: ******************** Resizing ******************************************