Node-red dashboard with weird behaviour

I am building this dashboard in node-red and suddenly when I send the data to the table this happens. Only with this table, I have one other table that is working fine.

enter image description here

*********************************************** EDIT ***************************************************
These are the flows from the tables:

This is one of the queries (function flow In):

msg.topic = "select month(noted_date) as the_month, min(temp), max(temp), avg(temp), std(temp) from temperature where out_in='In' group by the_month;"
return msg;

And the data that the table receives is from a csv file stored in a database.

I have a similar table but as less data, maybe it is because of the amount of data in the table?

Anyone as any idea why is it happening?
I've changed the size of the table and the layout but nothing seems to get those lines of the dashboard.

Kind of hard to guess with a bit more information like what node you are using, what is the data going into the table, what version of NR, node.js and the dashboard? (check the startup log)

Can you recreate it with some dummy data to make a small flow rereatng the problem? If so, post that flow too.

@zenofmud Hi, I've added more info in the post

What is the data coming out of the query?

This:

Please export your flow and attach it to a response. Make sure to read How to share code or flow json first.

also which query is that debug showing? and which table is the issue in?

Are ( ) actually valid characters in a javascript object ?

[
   {
      "id":"293bae97.c72192",
      "type":"tab",
      "label":"Flow 1",
      "disabled":false,
      "info":""
   },
   {
      "id":"26ed2545.564a4a",
      "type":"function",
      "z":"293bae97.c72192",
      "name":"ByDay_In",
      "func":"msg.topic = \"select date(noted_date) as the_date, min(temp), max(temp), avg(temp), std(temp) from temperature where out_in='In' group by the_date;\"\nreturn msg;",
      "outputs":1,
      "noerr":0,
      "x":560,
      "y":260,
      "wires":[
         [
            "8b2f4ade.596a68"
         ]
      ]
   },
   {
      "id":"c330519a.0a8b",
      "type":"function",
      "z":"293bae97.c72192",
      "name":"ByDay_Out",
      "func":"msg.topic = \"select date(noted_date) as the_date, min(temp), max(temp), avg(temp), std(temp) from temperature where out_in='Out' group by the_date;\"\nreturn msg;\n",
      "outputs":1,
      "noerr":0,
      "x":570,
      "y":320,
      "wires":[
         [
            "c5041d1a.7140c"
         ]
      ]
   },
   {
      "id":"8b2f4ade.596a68",
      "type":"mysql",
      "z":"293bae97.c72192",
      "mydb":"13acdda0.2cac92",
      "name":"temperature",
      "x":830,
      "y":200,
      "wires":[
         [
            "ddc0a527.f9ead8",
            "2b1c5459.74c5dc"
         ]
      ]
   },
   {
      "id":"c5041d1a.7140c",
      "type":"mysql",
      "z":"293bae97.c72192",
      "mydb":"13acdda0.2cac92",
      "name":"temperature",
      "x":830,
      "y":360,
      "wires":[
         [
            "bc79cd49.be787",
            "daa86b99.ca4d58"
         ]
      ]
   },
   {
      "id":"ddc0a527.f9ead8",
      "type":"debug",
      "z":"293bae97.c72192",
      "name":"print",
      "active":true,
      "tosidebar":true,
      "console":false,
      "tostatus":false,
      "complete":"payload",
      "targetType":"msg",
      "x":1050,
      "y":160,
      "wires":[

      ]
   },
   {
      "id":"bc79cd49.be787",
      "type":"debug",
      "z":"293bae97.c72192",
      "name":"print",
      "active":true,
      "tosidebar":true,
      "console":false,
      "tostatus":false,
      "complete":"payload",
      "targetType":"msg",
      "x":1050,
      "y":300,
      "wires":[

      ]
   },
   {
      "id":"1ee71c7a.60bec4",
      "type":"inject",
      "z":"293bae97.c72192",
      "name":"query",
      "topic":"",
      "payload":"",
      "payloadType":"date",
      "repeat":"",
      "crontab":"",
      "once":false,
      "onceDelay":"30",
      "x":330,
      "y":280,
      "wires":[
         [
            "26ed2545.564a4a",
            "c330519a.0a8b"
         ]
      ]
   },
   {
      "id":"2b1c5459.74c5dc",
      "type":"ui_table",
      "z":"293bae97.c72192",
      "group":"c37d1c07.847c3",
      "name":"Daily Temp In Table",
      "order":3,
      "width":20,
      "height":"8",
      "columns":[

      ],
      "outputs":0,
      "cts":false,
      "x":1090,
      "y":200,
      "wires":[

      ]
   },
   {
      "id":"3d664e11.fcd332",
      "type":"ui_text",
      "z":"293bae97.c72192",
      "group":"c37d1c07.847c3",
      "order":2,
      "width":20,
      "height":1,
      "name":"Daily In Title",
      "label":"Daily Inside",
      "format":"{{msg.payload}}",
      "layout":"row-left",
      "x":1070,
      "y":240,
      "wires":[

      ]
   },
   {
      "id":"daa86b99.ca4d58",
      "type":"ui_table",
      "z":"293bae97.c72192",
      "group":"d65d3757.ac3168",
      "name":"Daily Temp Out Table",
      "order":3,
      "width":20,
      "height":"8",
      "columns":[

      ],
      "outputs":0,
      "cts":false,
      "x":1100,
      "y":340,
      "wires":[

      ]
   },
   {
      "id":"43d6ab48.ee2374",
      "type":"ui_text",
      "z":"293bae97.c72192",
      "group":"d65d3757.ac3168",
      "order":2,
      "width":20,
      "height":1,
      "name":"Daily Out Title",
      "label":"Daily Outside",
      "format":"{{msg.payload}}",
      "layout":"row-left",
      "x":1080,
      "y":380,
      "wires":[

      ]
   },
   {
      "id":"13acdda0.2cac92",
      "type":"MySQLdatabase",
      "z":"",
      "name":"temperature",
      "host":"35.234.152.47",
      "port":"3306",
      "db":"Temperature",
      "tz":""
   },
   {
      "id":"c37d1c07.847c3",
      "type":"ui_group",
      "z":"",
      "name":"Daily Inside Statistics ",
      "tab":"12a1eedf.37daa1",
      "order":1,
      "disp":true,
      "width":"20",
      "collapse":false
   },
   {
      "id":"d65d3757.ac3168",
      "type":"ui_group",
      "z":"",
      "name":"Daily Outside Statistics",
      "tab":"12a1eedf.37daa1",
      "order":2,
      "disp":true,
      "width":"20",
      "collapse":false
   },
   {
      "id":"12a1eedf.37daa1",
      "type":"ui_tab",
      "z":"",
      "name":"Daily Data",
      "icon":"dashboard",
      "order":4,
      "disabled":false,
      "hidden":false
   }
]

the query is also in the post, and the issue is in the dashboard where's the 2 tables in the flow are.

Can you provide the schema for the database and some test data that will reproduce the issue?

Is this what you asked for?

+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| id         | varchar(244) | YES  |     | NULL    |       |
| room_id    | varchar(20)  | YES  |     | NULL    |       |
| noted_date | date         | YES  |     | NULL    |       |
| temp       | int(11)      | YES  |     | NULL    |       |
| out_in     | varchar(6)   | YES  |     | NULL    |       |
+------------+--------------+------+-----+---------+-------+
__export__.temp_log_165744_bbddfa7a,Room Admin,2018/11/28 00:34:00,37,Out
__export__.temp_log_165742_ba19edd4,Room Admin,2018/11/28 00:34:00,29,In
__export__.temp_log_165741_09e52822,Room Admin,2018/11/28 00:34:00,29,In
__export__.temp_log_165739_24678655,Room Admin,2018/11/28 00:32:00,38,Out
__export__.temp_log_165740_4c82d19c,Room Admin,2018/11/28 00:32:00,38,Out

Yes, let me see what happens when I use this.

Well with the data I create, I have no problem. What happens if you disconnect the wire to the table that displays correctly?

If I disconnect the wire the data still shows in the table.

Yes. Pretty much anything you want. But due to the non standard characters, bracket notation must be used to access their values.

I've opened the inspect element console and it seems that is this element below that is causing this but I don't know why.
In the table that works fine without all that text above the tables it is like this:
<p class="value ng-binding" ng-bind-html="me.item.getText()"></p>

In the table with the text above is like this:
<p class="value ng-binding" ng-bind-html="me.item.getText()"> [{"the_date":"2018-07-28T00:00:00.000Z","min(temp)":31,"max(temp)":31,"avg(temp)":31,"std(temp)":0},{"the_date":"2018-07-29T00:00:00.000Z","min(temp)":32,"max(temp)":33,"avg(temp)":32.5,"std(temp)":0.5},{"the_date":"2018-07-31T00:00:00.000Z","min(temp)":30,"max(temp)":31,"avg(temp)":30.9231,"std(temp)":0.26646935501059654},{"the_date":"2018-08-10T00:00:00.000Z","min(temp)":27,"max(temp)":30,"avg(temp)":28.6017,"std(temp)":0.6376563895057488},{"the_date":"2018-08-11T00:00:00.000Z","min(temp)":32,"max(temp)":33,"avg(temp)":32.8992,"std(temp)":0.3010308192084892},{"the_date":"2018-08-16T00:00:00.000Z","min(temp)":30,"max(temp)":32,"avg(temp)":30.4591,"std(temp)":0.5073631395478988},{"the_date":"2018-08-18T00:00:00.000Z","min(temp)":32,"max(temp)":33,"avg(temp)":32.5,"std(temp)":0.5},{"the_date":"2018-08-19T00:00:00.000Z","min(temp)":31,"max(temp)":33,"avg(temp)":32.3333,"std(temp)":0.6236095644623229},{"the_date":"2018-08-25T00:00:00.000Z","min(temp)":31,"max(temp)":32,"avg(temp)":31.2256,"std(temp)":0.41795314615600826},{"the_date":"2018-08-26T00:00:00.000Z","min(temp)":31,"max(temp)":32,"avg(temp)":31.48,"std(temp)":0.4995998398718719},{"the_date":"2018-08-30T00:00:00.000Z","min(temp)":30,"max(temp)":30,"avg(temp)":30,"std(temp)":0},{"the_date":"2018-09-03T00:00:00.000Z","min(temp)":31,"max(temp)":33,"avg(temp)":32.0174,"std(temp)":0.15738815737831346},{"the_date":"2018-09-04T00:00:00.000Z","min(temp)":29,"max(temp)":32,"avg(temp)":30.1614,"std(temp)":1.2103391427038055},{"the_date":"2018-09-05T00:00:00.000Z","min(temp)":27,"max(temp)":28,"avg(temp)":27.8889,"std(temp)":0.31426968052735454},{"the_date":"2018-09-06T00:00:00.000Z","min(temp)":24,"max(temp)":29,"avg(temp)":27.0526,"std(temp)":0.8833211456327468},{"the_date":"2018-09-07T00:00:00.000Z","min(temp)":27,"max(temp)":32,"avg(temp)":29.9964,"std(temp)":1.0259719312730644},{"the_date":"2018-09-09T00:00:00.000Z","min(temp)":24,"max(temp)":32,"avg(temp)":28.9671,"std(temp)":1.3288080379743326},{"the_date":"2018-09-10T00:00:00.000Z","min(temp)":27,"max(temp)":32,"avg(temp)":30.6256,"std(temp)":1.2393637553326549},{"the_date":"2018-09-11T00:00:00.000Z","min(temp)":27,"max(temp)":36,"avg(temp)":32.321,"std(temp)":2.5144434694427265},{"the_date":"2018-09-12T00:00:00.000Z","min(temp)":27,"max(temp)":34,"avg(temp)":30.4913,"std(temp)":2.364656413832642},{"the_date":"2018-09-13T00:00:00.000Z","min(temp)":25,"max(temp)":33,"avg(temp)":30.1677,"std(temp)":2.5209367487398504},{"the_date":"2018-09-14T00:00:00.000Z","min(temp)":25,"max(temp)":34,"avg(temp)":30.2,"std(temp)":2.773685875028629},{"the_date":"2018-09-15T00:00:00.000Z","min(temp)":27,"max(temp)":31,"avg(temp)":28.4694,"std(temp)":0.949802145160823},{"the_date":"2018-09-16T00:00:00.000Z","min(temp)":30,"max(temp)":41,"avg(temp)":32.383,"std(temp)":2.5810536483609785},{"the_date":"2018-09-17T00:00:00.000Z","min(temp)":28,"max(temp)":33,"avg(temp)":31.3821,"std(temp)":1.4286290272893936},{"the_date":"2018-09-18T00:00:00.000Z","min(temp)":29,"max(temp)":34,"avg(temp)":30.561,"std(temp)":1.808499991406496},{"the_date":"2018-09-19T00:00:00.000Z","min(temp)":29,"max(temp)":33,"avg(temp)":31.1753,"std(temp)":1.0255529992120307},{"the_date":"2018-09-20T00:00:00.000Z","min(temp)":30,"max(temp)":34,"avg(temp)":32.4305,"std(temp)":1.1364516275026477},{"the_date":"2018-09-21T00:00:00.000Z","min(temp)":30,"max(temp)":34,"avg(temp)":32.3564,"std(temp)":1.3393079224751818},{"the_date":"2018-09-22T00:00:00.000Z","min(temp)":34,"max(temp)":35,"avg(temp)":34.1333,"std(temp)":0.33993463423951903}, {"the_date":"2018-11-28T00:00:00.000Z","min(temp)":29,"max(temp)":29,"avg(temp)":29,"std(temp)":0}]</p>

Is it not that you are sending all data to the label?

Your label seems to be set to msg.payload and if I'm not mistaken, the payload is coming from the database - so it seems like you're getting what you asked for - the label showing the full database results.

1 Like

@Steve-Mcl You nailed it! At least in my reproducing it. (rats, I didn't see the forest becasue of the trees)

Where do I set to msg.payload?
I just asked for the min(temp), max, avg, etc...
I'm sorry it's the first time I am using node-red.

Open the property of your labels. Look at the settings.

Then look at the data going into the label (by attaching a debug just before it)