Query MySQL and displaying it in a dashboard Chart

The only issue i see is you are attempting tp put msg.payload from the mySQL select directly into a chart and a ui text.

If you look at the output of the mySQL node you will see it is an array - a chart expects the value to display to be in msg.payload and the topic to be the name of the series (this is explained in the chart built in help).
image

Use a change node to move the result into msg.payload and set the topic to a nice name

e.g...

modified flow...

[{"id":"40db8166.c4d","type":"ui_text","z":"28abaa7d.30d2e6","group":"816f6911.01f668","order":1,"width":0,"height":0,"name":"","label":"Object In Field","format":"{{msg.payload}}","layout":"row-left","x":960,"y":560,"wires":[]},{"id":"88e8b41.ced5648","type":"change","z":"28abaa7d.30d2e6","name":"move 1st row value to payload & set topic","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].trigger_count","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"CAMERA 2 Trigger Count","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":500,"wires":[["40db8166.c4d","5a96c769.669858","c6165000.6b97e"]]},{"id":"f110b5af.da4cc8","type":"mysql","z":"28abaa7d.30d2e6","mydb":"a8651bd.a83c8e8","name":"","x":540,"y":500,"wires":[["9e5d1a5a.b6ce38","88e8b41.ced5648"]]},{"id":"5a96c769.669858","type":"ui_chart","z":"28abaa7d.30d2e6","name":"","group":"816f6911.01f668","order":0,"width":"10","height":"7","label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":930,"y":600,"wires":[[]]},{"id":"c6165000.6b97e","type":"debug","z":"28abaa7d.30d2e6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1050,"y":440,"wires":[]},{"id":"ca3b867f.e70db8","type":"function","z":"28abaa7d.30d2e6","name":"","func":"msg.topic = \"SELECT COUNT(*) AS 'trigger_count' FROM bvcddb.objectinfield WHERE ID = '172.27.185.90'\";\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":500,"wires":[["f110b5af.da4cc8"]]},{"id":"9e5d1a5a.b6ce38","type":"debug","z":"28abaa7d.30d2e6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":440,"wires":[]},{"id":"ecce8e56.d1347","type":"inject","z":"28abaa7d.30d2e6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":500,"wires":[["ca3b867f.e70db8"]]},{"id":"816f6911.01f668","type":"ui_group","name":"Camera","tab":"62a9cea8.ba3c5","order":1,"disp":true,"width":"20","collapse":false},{"id":"a8651bd.a83c8e8","type":"MySQLdatabase","name":"","host":"127.0.0.1","port":"3306","db":"bvcddb","tz":"","charset":"UTF8"},{"id":"62a9cea8.ba3c5","type":"ui_tab","name":"Info","icon":"dashboard","disabled":false,"hidden":false}]

PS: this is untested since i dont have your data or database.

1 Like