I want to get x-axis information as text (eg 'HH: mm: ss') and set it as the x-axis of the chart. The x-axis setting item is custom and its contents are set to moment.format (msg.payload) or msg.paload. However, node-red does not treat this as a msg object, but recognizes it as:
m (month)
s (second)
g.p
a (AM, PM)
ylo
a (AM, PM)
d (date)
I'm attaching the code below.
HELP ME!!!
[{"id":"69ba6bc.2301f94","type":"tab","label":"플로우 4","disabled":false,"info":""},{"id":"1fde4623.44e68a","type":"function","z":"69ba6bc.2301f94","name":"","func":"for (var i=0;i<100;i++) {\n node.send({payload:i})\n}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":320,"wires":[["88cc72b5.a794e"]]},{"id":"cd8a6d20.c1a8a","type":"inject","z":"69ba6bc.2301f94","name":"timestemp","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":320,"wires":[["1fde4623.44e68a"]]},{"id":"88cc72b5.a794e","type":"delay","z":"69ba6bc.2301f94","name":"","pauseType":"rate","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":490,"y":320,"wires":[["e7e95f45.76db4","aa6df58a.e771a8"]]},{"id":"e7e95f45.76db4","type":"debug","z":"69ba6bc.2301f94","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":670,"y":220,"wires":[]},{"id":"aa6df58a.e771a8","type":"ui_chart","z":"69ba6bc.2301f94","name":"chart1","group":"b9ab80ba.7fea2","order":1,"width":0,"height":0,"label":"chart1","chartType":"line","legend":"false","xformat":"moment.format(msg.payload)","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":660,"y":120,"wires":[[]]},{"id":"24c836d3.74adaa","type":"function","z":"69ba6bc.2301f94","name":"text","func":"var lastinput = context.get(\"lastinput\") || \"\";\n\nif(msg.topic == \"textinput\"){\n lastinput = msg.payload;\n context.set(\"lastinput\",lastinput);\n}\n\nif(msg.topic == \"save\"){\n msg.payload = lastinput;\n return msg;\n}\n\n\n","outputs":1,"noerr":0,"x":330,"y":180,"wires":[["e7e95f45.76db4","aa6df58a.e771a8"]]},{"id":"f651704.71c0e9","type":"ui_button","z":"69ba6bc.2301f94","name":"","group":"f2832e9.5caf2d","order":32,"width":0,"height":0,"passthru":false,"label":"save","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"save","x":90,"y":240,"wires":[["24c836d3.74adaa"]]},{"id":"28237e07.f47082","type":"ui_text_input","z":"69ba6bc.2301f94","name":"","label":"text","tooltip":"","group":"f2832e9.5caf2d","order":31,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"textinput","x":90,"y":140,"wires":[["24c836d3.74adaa"]]},{"id":"b9ab80ba.7fea2","type":"ui_group","z":"","name":"chartmain1","tab":"b7671920.3fc3d8","disp":true,"width":"6","collapse":false},{"id":"f2832e9.5caf2d","type":"ui_group","z":"","name":"inputgroup","tab":"b7671920.3fc3d8","disp":true,"width":"6","collapse":false},{"id":"b7671920.3fc3d8","type":"ui_tab","z":"","name":"tab2","icon":"dashboard","disabled":false,"hidden":false}]