The Library Manager could not find an "official" HX711 library. So I was not able to reproduce your program exactly.
However, this example illustrates two ways of printing a varying number. I use a YELLOW background to highlight the printed characters.
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
void setup()
{
Serial.begin(9600);
uint16_t identifier = tft.readID();
tft.begin(identifier);
Serial.print(identifier);
tft.setRotation(1);
tft.fillScreen(WHITE);
tft.setTextSize(4);
tft.setTextColor(BLACK, YELLOW); //set back colour for rubout
}
void loop()
{
float result = 0.01 * random(-10000, 30000); //-100.0 to +300.00
Serial.println(result, 2);
tft.setCursor(130, 100);
tft.print(result, 2); //2 decimals
tft.print(" "); //rubs out old digit
tft.setCursor(130, 140);
char buf[10];
dtostrf(result, 6, 2, buf); //width=6, prec=2
tft.print(buf); //-99.99 to 299.99
delay(1000); //wait between readings
}
Note that the "trailing space" method works with similar numbers but goes wrong when the result width varies.
Using dtostrf() gives you nice formatted output. You can even use it for integers if you use prec=0.
David.