No float data will be read by Grafana

I collect data with InfluxDB and in a certain measurement there are 6 rows with integer values and 3 with real values.
I can query the integer data but if I make a query for the real data columns I get ‘No data’ in the panel.
To add some information:
I collect the data with NodeRed where I use the MQTT en HomeSeer nodes to get the data.
For those data that are real values I use the function parseFloat to transform the string to real values:

//read payload from MQTT node
var stringValue = msg.payload;

//convert string to float to 1 decimal places
var T_WNK = parseFloat(stringValue).toFixed(1);

//store as flow object
flow.set('T_WNK',T_WNK);

//set and return payload
msg.payload = T_WNK;
return msg;

For the integer values I use parseInt:

//read payload
var stringValue = msg.payload;

//convert string to int
var CO2_BUI = parseInt(stringValue);

//store as flow object
flow.set('CO2_BUI',CO2_BUI);

//set and return payload
msg.payload = CO2_BUI;
return msg;

Any idea where to find the solution?

It tunred out that the parseInt and ParseFloat functions delever strings in the database.
Using the Number function resulted in nice floats, so problem solved.

1 Like