How to convert epoch timestamp into plotly chart?

How can i convert tis timestamp has a complete date and time like 'yyyy-mm-dd HH:MM:SS.ssssss'
My chart looks like:
newplot

i want to looks like:
image

can someone help me?

My code:

[
    {
        "id": "e0c3fff1129abd5f",
        "type": "function",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "name": "function 55",
        "func": "var data = msg.payload;\nvar x = [];\nvar y = [];\nfor (var i = 0; i < data.length; i++) {\n    x.push(data[i].x);\n    y.push(data[i].y);\n}\nmsg.payload = {\n    x: x,\n    y: y,\n    type: 'scatter',\n    mode: 'lines+markers'\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 990,
        "y": 1080,
        "wires": [
            [
                "b4ee668f5b4920f0",
                "4204cc51074da9ae",
                "cde024167bc4f730"
            ]
        ]
    },
    {
        "id": "86ee48f6645815a6",
        "type": "inject",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[{\"x\":1676236262,\"y\":17.3},{\"x\":1676236263,\"y\":17.4},{\"x\":1676236297,\"y\":17.3},{\"x\":1676236298,\"y\":17.4},{\"x\":1676236307,\"y\":17.3},{\"x\":1676236308,\"y\":17.4},{\"x\":1676236310,\"y\":17.3},{\"x\":1676236311,\"y\":17.4},{\"x\":1676236314,\"y\":17.3},{\"x\":1676236315,\"y\":17.4},{\"x\":1676236319,\"y\":17.3},{\"x\":1676236320,\"y\":17.4},{\"x\":1676236321,\"y\":17.3},{\"x\":1676236322,\"y\":17.4},{\"x\":1676236324,\"y\":17.3},{\"x\":1676236325,\"y\":17.4},{\"x\":1676236330,\"y\":17.3},{\"x\":1676236331,\"y\":17.4},{\"x\":1676236335,\"y\":17.3},{\"x\":1676236337,\"y\":17.4},{\"x\":1676236338,\"y\":17.3},{\"x\":1676236339,\"y\":17.4},{\"x\":1676236340,\"y\":17.3},{\"x\":1676236341,\"y\":17.4},{\"x\":1676236342,\"y\":17.3},{\"x\":1676236343,\"y\":17.4},{\"x\":1676236349,\"y\":17.3},{\"x\":1676236350,\"y\":17.4},{\"x\":1676236351,\"y\":17.3},{\"x\":1676236354,\"y\":17.4},{\"x\":1676236355,\"y\":17.3},{\"x\":1676236356,\"y\":17.4},{\"x\":1676236361,\"y\":17.3},{\"x\":1676236362,\"y\":17.4},{\"x\":1676236363,\"y\":17.3},{\"x\":1676236368,\"y\":17.4},{\"x\":1676236380,\"y\":17.3},{\"x\":1676236381,\"y\":17.4},{\"x\":1676236384,\"y\":17.3},{\"x\":1676236385,\"y\":17.4},{\"x\":1676236399,\"y\":17.3},{\"x\":1676236401,\"y\":17.4},{\"x\":1676236402,\"y\":17.3},{\"x\":1676236403,\"y\":17.4},{\"x\":1676236653,\"y\":17.3},{\"x\":1676236654,\"y\":17.4},{\"x\":1676236655,\"y\":17.3},{\"x\":1676236657,\"y\":17.4},{\"x\":1676236669,\"y\":17.3},{\"x\":1676236670,\"y\":17.4},{\"x\":1676236671,\"y\":17.3},{\"x\":1676236673,\"y\":17.4},{\"x\":1676236674,\"y\":17.3},{\"x\":1676236681,\"y\":17.4},{\"x\":1676236683,\"y\":17.3},{\"x\":1676236684,\"y\":17.4},{\"x\":1676236686,\"y\":17.3},{\"x\":1676236687,\"y\":17.4},{\"x\":1676236688,\"y\":17.3},{\"x\":1676236691,\"y\":17.4},{\"x\":1676236692,\"y\":17.3},{\"x\":1676236695,\"y\":17.4},{\"x\":1676236696,\"y\":17.3},{\"x\":1676236697,\"y\":17.4},{\"x\":1676236698,\"y\":17.3},{\"x\":1676236706,\"y\":17.4},{\"x\":1676236707,\"y\":17.3},{\"x\":1676236708,\"y\":17.4},{\"x\":1676236709,\"y\":17.3},{\"x\":1676236711,\"y\":17.4},{\"x\":1676236713,\"y\":17.3},{\"x\":1676236724,\"y\":17.4},{\"x\":1676236725,\"y\":17.3},{\"x\":1676236726,\"y\":17.4},{\"x\":1676236727,\"y\":17.3},{\"x\":1676236732,\"y\":17.4},{\"x\":1676236733,\"y\":17.3},{\"x\":1676236737,\"y\":17.4},{\"x\":1676236738,\"y\":17.3},{\"x\":1676236740,\"y\":17.4},{\"x\":1676236742,\"y\":17.3},{\"x\":1676236744,\"y\":17.4},{\"x\":1676236745,\"y\":17.3},{\"x\":1676236747,\"y\":17.4},{\"x\":1676236748,\"y\":17.3},{\"x\":1676236753,\"y\":17.4},{\"x\":1676236755,\"y\":17.3},{\"x\":1676236760,\"y\":17.4},{\"x\":1676236761,\"y\":17.3},{\"x\":1676236762,\"y\":17.4},{\"x\":1676236763,\"y\":17.3},{\"x\":1676236767,\"y\":17.4},{\"x\":1676236772,\"y\":17.3},{\"x\":1676236776,\"y\":17.4},{\"x\":1676236781,\"y\":17.3},{\"x\":1676236782,\"y\":17.4},{\"x\":1676236783,\"y\":17.3},{\"x\":1676236784,\"y\":17.4},{\"x\":1676236785,\"y\":17.3},{\"x\":1676236786,\"y\":17.4},{\"x\":1676236787,\"y\":17.3},{\"x\":1676236789,\"y\":17.4},{\"x\":1676236791,\"y\":17.3},{\"x\":1676236792,\"y\":17.4},{\"x\":1676236794,\"y\":17.3},{\"x\":1676236796,\"y\":17.4},{\"x\":1676236798,\"y\":17.3},{\"x\":1676236800,\"y\":17.4},{\"x\":1676236801,\"y\":17.3},{\"x\":1676236802,\"y\":17.4},{\"x\":1676236804,\"y\":17.3},{\"x\":1676236806,\"y\":17.4},{\"x\":1676236808,\"y\":17.3},{\"x\":1676236809,\"y\":17.4},{\"x\":1676236812,\"y\":17.3},{\"x\":1676236813,\"y\":17.4},{\"x\":1676236814,\"y\":17.3},{\"x\":1676236815,\"y\":17.4},{\"x\":1676236826,\"y\":17.3},{\"x\":1676236829,\"y\":17.4},{\"x\":1676236832,\"y\":17.3},{\"x\":1676236834,\"y\":17.4},{\"x\":1676236843,\"y\":17.3},{\"x\":1676236844,\"y\":17.4},{\"x\":1676237102,\"y\":17.5},{\"x\":1676237103,\"y\":17.4},{\"x\":1676237115,\"y\":17.5},{\"x\":1676237117,\"y\":17.4},{\"x\":1676237130,\"y\":17.5},{\"x\":1676237131,\"y\":17.4},{\"x\":1676237138,\"y\":17.5},{\"x\":1676237139,\"y\":17.4},{\"x\":1676237140,\"y\":17.5},{\"x\":1676237142,\"y\":17.4},{\"x\":1676237152,\"y\":17.5},{\"x\":1676237153,\"y\":17.4},{\"x\":1676237154,\"y\":17.5},{\"x\":1676237155,\"y\":17.4},{\"x\":1676237159,\"y\":17.5},{\"x\":1676237160,\"y\":17.4},{\"x\":1676237167,\"y\":17.5},{\"x\":1676237168,\"y\":17.4},{\"x\":1676237172,\"y\":17.5},{\"x\":1676237174,\"y\":17.4},{\"x\":1676237176,\"y\":17.5},{\"x\":1676237177,\"y\":17.4},{\"x\":1676237187,\"y\":17.5},{\"x\":1676237188,\"y\":17.4},{\"x\":1676237196,\"y\":17.5},{\"x\":1676237197,\"y\":17.4},{\"x\":1676237202,\"y\":17.5},{\"x\":1676237204,\"y\":17.4},{\"x\":1676237206,\"y\":17.5},{\"x\":1676237208,\"y\":17.4},{\"x\":1676237216,\"y\":17.5},{\"x\":1676237217,\"y\":17.4},{\"x\":1676237218,\"y\":17.5},{\"x\":1676237219,\"y\":17.4},{\"x\":1676237221,\"y\":17.5},{\"x\":1676237222,\"y\":17.4},{\"x\":1676237240,\"y\":17.5},{\"x\":1676237242,\"y\":17.4},{\"x\":1676237243,\"y\":17.5},{\"x\":1676237244,\"y\":17.4},{\"x\":1676237246,\"y\":17.5},{\"x\":1676237249,\"y\":17.4},{\"x\":1676237250,\"y\":17.5},{\"x\":1676237251,\"y\":17.4},{\"x\":1676237253,\"y\":17.5},{\"x\":1676237257,\"y\":17.4},{\"x\":1676237260,\"y\":17.5},{\"x\":1676237264,\"y\":17.4},{\"x\":1676237265,\"y\":17.5},{\"x\":1676239168,\"y\":16.8},{\"x\":1676239170,\"y\":16.9},{\"x\":1676239173,\"y\":16.8},{\"x\":1676239175,\"y\":16.9},{\"x\":1676239178,\"y\":16.8},{\"x\":1676239182,\"y\":16.9},{\"x\":1676239183,\"y\":16.8},{\"x\":1676239196,\"y\":16.7},{\"x\":1676239197,\"y\":16.8},{\"x\":1676239202,\"y\":16.7},{\"x\":1676239203,\"y\":16.8},{\"x\":1676239206,\"y\":16.7},{\"x\":1676239210,\"y\":16.8},{\"x\":1676239211,\"y\":16.7},{\"x\":1676239216,\"y\":16.8},{\"x\":1676239217,\"y\":16.7},{\"x\":1676239246,\"y\":16.6},{\"x\":1676239246,\"y\":16.7},{\"x\":1676239247,\"y\":16.6},{\"x\":1676239289,\"y\":16.5},{\"x\":1676239290,\"y\":16.6},{\"x\":1676239291,\"y\":16.5},{\"x\":1676239293,\"y\":16.6},{\"x\":1676239297,\"y\":16.5},{\"x\":1676239298,\"y\":16.6},{\"x\":1676239299,\"y\":16.5},{\"x\":1676239304,\"y\":16.6},{\"x\":1676239305,\"y\":16.5},{\"x\":1676239306,\"y\":16.6},{\"x\":1676239307,\"y\":16.5},{\"x\":1676239310,\"y\":16.6},{\"x\":1676239311,\"y\":16.5},{\"x\":1676239350,\"y\":16.4},{\"x\":1676239351,\"y\":16.5},{\"x\":1676239368,\"y\":16.4},{\"x\":1676239369,\"y\":16.5},{\"x\":1676239375,\"y\":16.4},{\"x\":1676239376,\"y\":16.5},{\"x\":1676239648,\"y\":16.6},{\"x\":1676239649,\"y\":16.5},{\"x\":1676239656,\"y\":16.6},{\"x\":1676239658,\"y\":16.5},{\"x\":1676239666,\"y\":16.6},{\"x\":1676239667,\"y\":16.5},{\"x\":1676239673,\"y\":16.6},{\"x\":1676239674,\"y\":16.5},{\"x\":1676239680,\"y\":16.6},{\"x\":1676239682,\"y\":16.5},{\"x\":1676239683,\"y\":16.6},{\"x\":1676239685,\"y\":16.5},{\"x\":1676239687,\"y\":16.6},{\"x\":1676239688,\"y\":16.5},{\"x\":1676239690,\"y\":16.6},{\"x\":1676239691,\"y\":16.5},{\"x\":1676239693,\"y\":16.6},{\"x\":1676239695,\"y\":16.5},{\"x\":1676239699,\"y\":16.6},{\"x\":1676239700,\"y\":16.5},{\"x\":1676239709,\"y\":16.6},{\"x\":1676239711,\"y\":16.5},{\"x\":1676239738,\"y\":16.6},{\"x\":1676239739,\"y\":16.5},{\"x\":1676239747,\"y\":16.6},{\"x\":1676239748,\"y\":16.5},{\"x\":1676240006,\"y\":16.6},{\"x\":1676240007,\"y\":16.5},{\"x\":1676240025,\"y\":16.6},{\"x\":1676240028,\"y\":16.5},{\"x\":1676240029,\"y\":16.6},{\"x\":1676240030,\"y\":16.5},{\"x\":1676240037,\"y\":16.6},{\"x\":1676240039,\"y\":16.5},{\"x\":1676240042,\"y\":16.6},{\"x\":1676240046,\"y\":16.5},{\"x\":1676240047,\"y\":16.6},{\"x\":1676240053,\"y\":16.5},{\"x\":1676240054,\"y\":16.6},{\"x\":1676240061,\"y\":16.5},{\"x\":1676240062,\"y\":16.6},{\"x\":1676240066,\"y\":16.5},{\"x\":1676240067,\"y\":16.6},{\"x\":1676240214,\"y\":16.7},{\"x\":1676240215,\"y\":16.6},{\"x\":1676240221,\"y\":16.7},{\"x\":1676240222,\"y\":16.6},{\"x\":1676240232,\"y\":16.7},{\"x\":1676240233,\"y\":16.6},{\"x\":1676240237,\"y\":16.7},{\"x\":1676240239,\"y\":16.6},{\"x\":1676240242,\"y\":16.7},{\"x\":1676240243,\"y\":16.6},{\"x\":1676240245,\"y\":16.7},{\"x\":1676240246,\"y\":16.6},{\"x\":1676240248,\"y\":16.7},{\"x\":1676240255,\"y\":16.6},{\"x\":1676240256,\"y\":16.7},{\"x\":1676240258,\"y\":16.6},{\"x\":1676240259,\"y\":16.7},{\"x\":1676240260,\"y\":16.6},{\"x\":1676240266,\"y\":16.7},{\"x\":1676240267,\"y\":16.6},{\"x\":1676240270,\"y\":16.7},{\"x\":1676240271,\"y\":16.6},{\"x\":1676240595,\"y\":16.7},{\"x\":1676240596,\"y\":16.6},{\"x\":1676240600,\"y\":16.7},{\"x\":1676240601,\"y\":16.6},{\"x\":1676240615,\"y\":16.7},{\"x\":1676240619,\"y\":16.6},{\"x\":1676240620,\"y\":16.7},{\"x\":1676240622,\"y\":16.6},{\"x\":1676240623,\"y\":16.7},{\"x\":1676240624,\"y\":16.6},{\"x\":1676240634,\"y\":16.7},{\"x\":1676240636,\"y\":16.6},{\"x\":1676240638,\"y\":16.7},{\"x\":1676240639,\"y\":16.6},{\"x\":1676240643,\"y\":16.7},{\"x\":1676240645,\"y\":16.6},{\"x\":1676240646,\"y\":16.7},{\"x\":1676240648,\"y\":16.6},{\"x\":1676240651,\"y\":16.7},{\"x\":1676240653,\"y\":16.6},{\"x\":1676240654,\"y\":16.7},{\"x\":1676240656,\"y\":16.6},{\"x\":1676240661,\"y\":16.7},{\"x\":1676240662,\"y\":16.6},{\"x\":1676240668,\"y\":16.7},{\"x\":1676240669,\"y\":16.6},{\"x\":1676240675,\"y\":16.7},{\"x\":1676240676,\"y\":16.6},{\"x\":1676240798,\"y\":16.5},{\"x\":1676240799,\"y\":16.6},{\"x\":1676240884,\"y\":16.5},{\"x\":1676240886,\"y\":16.6},{\"x\":1676240893,\"y\":16.5},{\"x\":1676240894,\"y\":16.6},{\"x\":1676240898,\"y\":16.5},{\"x\":1676240899,\"y\":16.6},{\"x\":1676240903,\"y\":16.5},{\"x\":1676240904,\"y\":16.6},{\"x\":1676240905,\"y\":16.5},{\"x\":1676240907,\"y\":16.6},{\"x\":1676240911,\"y\":16.5},{\"x\":1676240914,\"y\":16.6},{\"x\":1676240917,\"y\":16.5},{\"x\":1676240918,\"y\":16.6},{\"x\":1676240924,\"y\":16.5},{\"x\":1676240925,\"y\":16.6},{\"x\":1676240932,\"y\":16.5},{\"x\":1676240933,\"y\":16.6},{\"x\":1676240936,\"y\":16.5},{\"x\":1676240940,\"y\":16.6},{\"x\":1676240942,\"y\":16.5},{\"x\":1676240944,\"y\":16.6},{\"x\":1676240945,\"y\":16.5},{\"x\":1676240951,\"y\":16.6},{\"x\":1676240952,\"y\":16.5},{\"x\":1676241255,\"y\":16.6},{\"x\":1676241256,\"y\":16.5},{\"x\":1676241276,\"y\":16.6},{\"x\":1676241277,\"y\":16.5},{\"x\":1676241283,\"y\":16.6},{\"x\":1676241284,\"y\":16.5},{\"x\":1676241285,\"y\":16.6},{\"x\":1676241289,\"y\":16.5},{\"x\":1676241290,\"y\":16.6},{\"x\":1676241291,\"y\":16.5},{\"x\":1676241292,\"y\":16.6},{\"x\":1676241297,\"y\":16.5},{\"x\":1676241300,\"y\":16.6},{\"x\":1676241301,\"y\":16.5},{\"x\":1676241306,\"y\":16.6},{\"x\":1676241308,\"y\":16.5},{\"x\":1676241310,\"y\":16.6},{\"x\":1676241311,\"y\":16.5},{\"x\":1676241313,\"y\":16.6},{\"x\":1676241314,\"y\":16.5},{\"x\":1676241315,\"y\":16.6},{\"x\":1676241316,\"y\":16.5},{\"x\":1676241317,\"y\":16.6},{\"x\":1676241318,\"y\":16.5},{\"x\":1676241319,\"y\":16.6},{\"x\":1676241327,\"y\":16.5},{\"x\":1676241330,\"y\":16.6},{\"x\":1676241332,\"y\":16.5},{\"x\":1676241333,\"y\":16.6},{\"x\":1676241382,\"y\":16.5},{\"x\":1676241384,\"y\":16.6},{\"x\":1676241416,\"y\":16.5},{\"x\":1676241417,\"y\":16.6},{\"x\":1676241423,\"y\":16.5},{\"x\":1676241424,\"y\":16.6},{\"x\":1676241451,\"y\":16.5},{\"x\":1676241453,\"y\":16.6},{\"x\":1676241457,\"y\":16.5},{\"x\":1676241458,\"y\":16.6},{\"x\":1676241465,\"y\":16.5},{\"x\":1676241466,\"y\":16.6},{\"x\":1676241689,\"y\":16.7},{\"x\":1676241690,\"y\":16.6},{\"x\":1676241984,\"y\":16.5},{\"x\":1676241985,\"y\":16.6},{\"x\":1676241988,\"y\":16.5},{\"x\":1676241991,\"y\":16.6},{\"x\":1676241993,\"y\":16.5},{\"x\":1676241996,\"y\":16.6},{\"x\":1676241998,\"y\":16.5},{\"x\":1676242000,\"y\":16.6},{\"x\":1676242001,\"y\":16.5},{\"x\":1676242010,\"y\":16.6},{\"x\":1676242012,\"y\":16.5},{\"x\":1676242037,\"y\":16.6},{\"x\":1676242038,\"y\":16.5},{\"x\":1676242093,\"y\":16.6},{\"x\":1676242094,\"y\":16.5},{\"x\":1676242101,\"y\":16.6},{\"x\":1676242102,\"y\":16.5},{\"x\":1676242105,\"y\":16.6},{\"x\":1676242107,\"y\":16.5},{\"x\":1676242114,\"y\":16.6},{\"x\":1676242115,\"y\":16.5},{\"x\":1676242122,\"y\":16.6},{\"x\":1676242124,\"y\":16.5},{\"x\":1676242125,\"y\":16.6},{\"x\":1676242126,\"y\":16.5},{\"x\":1676242130,\"y\":16.6},{\"x\":1676242133,\"y\":16.5},{\"x\":1676242134,\"y\":16.6},{\"x\":1676242136,\"y\":16.5},{\"x\":1676242140,\"y\":16.6},{\"x\":1676242142,\"y\":16.5},{\"x\":1676242144,\"y\":16.6},{\"x\":1676242147,\"y\":16.5},{\"x\":1676242149,\"y\":16.6},{\"x\":1676242152,\"y\":16.5},{\"x\":1676242153,\"y\":16.6},{\"x\":1676242161,\"y\":16.5},{\"x\":1676242162,\"y\":16.6},{\"x\":1676242163,\"y\":16.5},{\"x\":1676242165,\"y\":16.6},{\"x\":1676242169,\"y\":16.5},{\"x\":1676242170,\"y\":16.6},{\"x\":1676242178,\"y\":16.5},{\"x\":1676242179,\"y\":16.6},{\"x\":1676242180,\"y\":16.5},{\"x\":1676242181,\"y\":16.6},{\"x\":1676242183,\"y\":16.5}]",
        "payloadType": "json",
        "x": 830,
        "y": 1120,
        "wires": [
            [
                "e0c3fff1129abd5f"
            ]
        ]
    },
    {
        "id": "4204cc51074da9ae",
        "type": "debug",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "name": "debug 5",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1260,
        "y": 1020,
        "wires": []
    }
]

thanks!

Those "dates" on the x-axis look like the values you are using may be in epoch seconds? (hard to tell without the original input data). Try multiplying each x value by 1000 to get epoch milliseconds, which the chart will interpret correctly as a datetime stamp.

Ive already tried this. But the value just raises up.

Well, if I had to guess, then maybe your values are strings and the scatter plot type does not try to parse them as date values?

Or, you could copy some actual payload data from the debug sidebar and show us what your data actually is...

Finnally i got it!!

Thanks for the help guys!

Here is my code

[
    {
        "id": "86ee48f6645815a6",
        "type": "inject",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "TESTE2",
        "payload": "[{\"x\":1676238513,\"y\":17.4},{\"x\":1676238514,\"y\":17.3},{\"x\":1676238547,\"y\":17.2},{\"x\":1676238549,\"y\":17.3},{\"x\":1676238578,\"y\":17.2},{\"x\":1676238579,\"y\":17.3},{\"x\":1676238581,\"y\":17.2},{\"x\":1676238583,\"y\":17.3},{\"x\":1676238585,\"y\":17.2},{\"x\":1676238586,\"y\":17.3},{\"x\":1676238588,\"y\":17.2},{\"x\":1676238591,\"y\":17.3},{\"x\":1676238592,\"y\":17.2},{\"x\":1676238595,\"y\":17.3},{\"x\":1676238597,\"y\":17.2},{\"x\":1676238600,\"y\":17.3},{\"x\":1676238601,\"y\":17.2},{\"x\":1676238604,\"y\":17.3},{\"x\":1676238605,\"y\":17.2},{\"x\":1676238607,\"y\":17.3},{\"x\":1676238608,\"y\":17.2},{\"x\":1676238618,\"y\":17.1},{\"x\":1676238620,\"y\":17.2},{\"x\":1676238621,\"y\":17.1},{\"x\":1676238622,\"y\":17.2},{\"x\":1676238623,\"y\":17.1},{\"x\":1676238625,\"y\":17.2},{\"x\":1676238626,\"y\":17.1},{\"x\":1676238627,\"y\":17.2},{\"x\":1676238631,\"y\":17.1},{\"x\":1676238633,\"y\":17.2},{\"x\":1676238638,\"y\":17.1},{\"x\":1676238668,\"y\":17},{\"x\":1676238669,\"y\":17.1},{\"x\":1676238671,\"y\":17},{\"x\":1676238672,\"y\":17.1},{\"x\":1676238674,\"y\":17},{\"x\":1676238675,\"y\":17.1},{\"x\":1676238679,\"y\":17},{\"x\":1676238682,\"y\":17.1},{\"x\":1676238683,\"y\":17},{\"x\":1676238684,\"y\":17.1},{\"x\":1676238685,\"y\":17},{\"x\":1676238687,\"y\":17.1},{\"x\":1676238689,\"y\":17},{\"x\":1676238690,\"y\":17.1},{\"x\":1676238691,\"y\":17},{\"x\":1676238711,\"y\":17.1},{\"x\":1676238712,\"y\":17},{\"x\":1676238830,\"y\":16.9},{\"x\":1676238832,\"y\":17},{\"x\":1676238840,\"y\":16.9},{\"x\":1676238841,\"y\":17},{\"x\":1676238846,\"y\":16.9},{\"x\":1676238847,\"y\":17},{\"x\":1676238853,\"y\":16.9},{\"x\":1676238854,\"y\":17},{\"x\":1676238858,\"y\":16.9},{\"x\":1676238859,\"y\":17},{\"x\":1676238860,\"y\":16.9},{\"x\":1676238862,\"y\":17},{\"x\":1676238865,\"y\":16.9},{\"x\":1676238866,\"y\":17},{\"x\":1676238870,\"y\":16.9},{\"x\":1676238871,\"y\":17},{\"x\":1676238872,\"y\":16.9},{\"x\":1676238874,\"y\":17},{\"x\":1676238875,\"y\":16.9},{\"x\":1676238879,\"y\":17},{\"x\":1676238881,\"y\":16.9},{\"x\":1676238884,\"y\":17},{\"x\":1676238885,\"y\":16.9},{\"x\":1676238887,\"y\":17},{\"x\":1676238891,\"y\":16.9},{\"x\":1676238896,\"y\":17},{\"x\":1676238897,\"y\":16.9},{\"x\":1676238904,\"y\":17},{\"x\":1676238905,\"y\":16.9},{\"x\":1676238909,\"y\":17},{\"x\":1676238911,\"y\":16.9},{\"x\":1676238935,\"y\":16.8},{\"x\":1676238936,\"y\":16.9},{\"x\":1676238937,\"y\":16.8},{\"x\":1676238938,\"y\":16.9},{\"x\":1676238939,\"y\":16.8},{\"x\":1676238940,\"y\":16.9},{\"x\":1676238943,\"y\":16.8},{\"x\":1676238945,\"y\":16.9},{\"x\":1676238948,\"y\":16.8},{\"x\":1676238952,\"y\":16.9},{\"x\":1676238953,\"y\":16.8},{\"x\":1676238957,\"y\":16.9},{\"x\":1676238958,\"y\":16.8},{\"x\":1676238961,\"y\":16.9},{\"x\":1676238968,\"y\":16.8},{\"x\":1676238969,\"y\":16.9},{\"x\":1676238970,\"y\":16.8},{\"x\":1676238972,\"y\":16.9},{\"x\":1676238974,\"y\":16.8},{\"x\":1676238975,\"y\":16.9},{\"x\":1676238980,\"y\":16.8},{\"x\":1676238981,\"y\":16.9},{\"x\":1676238987,\"y\":16.8},{\"x\":1676238988,\"y\":16.9},{\"x\":1676238990,\"y\":16.8},{\"x\":1676238991,\"y\":16.9},{\"x\":1676238995,\"y\":16.8},{\"x\":1676238996,\"y\":16.9},{\"x\":1676239000,\"y\":16.8},{\"x\":1676239001,\"y\":16.9},{\"x\":1676239005,\"y\":16.8},{\"x\":1676239006,\"y\":16.9},{\"x\":1676239009,\"y\":16.8},{\"x\":1676239010,\"y\":16.9},{\"x\":1676239015,\"y\":16.8},{\"x\":1676239017,\"y\":16.9},{\"x\":1676239019,\"y\":16.8},{\"x\":1676239020,\"y\":16.9},{\"x\":1676239021,\"y\":16.8},{\"x\":1676239022,\"y\":16.9},{\"x\":1676239024,\"y\":16.8},{\"x\":1676239025,\"y\":16.9},{\"x\":1676239026,\"y\":16.8},{\"x\":1676239028,\"y\":16.9},{\"x\":1676239032,\"y\":16.8},{\"x\":1676239034,\"y\":16.9},{\"x\":1676239035,\"y\":16.8},{\"x\":1676239040,\"y\":16.9},{\"x\":1676239042,\"y\":16.8},{\"x\":1676239045,\"y\":16.9},{\"x\":1676239046,\"y\":16.8},{\"x\":1676239047,\"y\":16.9},{\"x\":1676239049,\"y\":16.8},{\"x\":1676239050,\"y\":16.9},{\"x\":1676239051,\"y\":16.8},{\"x\":1676239052,\"y\":16.9},{\"x\":1676239053,\"y\":16.8},{\"x\":1676239054,\"y\":16.9},{\"x\":1676239062,\"y\":16.8},{\"x\":1676239063,\"y\":16.9},{\"x\":1676239065,\"y\":16.8},{\"x\":1676239066,\"y\":16.9},{\"x\":1676239070,\"y\":16.8},{\"x\":1676239071,\"y\":16.9},{\"x\":1676239076,\"y\":16.8},{\"x\":1676239078,\"y\":16.9},{\"x\":1676239082,\"y\":16.8},{\"x\":1676239083,\"y\":16.9},{\"x\":1676239084,\"y\":16.8},{\"x\":1676239086,\"y\":16.9},{\"x\":1676239094,\"y\":16.8},{\"x\":1676239095,\"y\":16.9},{\"x\":1676239097,\"y\":16.8},{\"x\":1676239098,\"y\":16.9},{\"x\":1676239105,\"y\":16.8},{\"x\":1676239106,\"y\":16.9},{\"x\":1676239107,\"y\":16.8},{\"x\":1676239108,\"y\":16.9},{\"x\":1676239109,\"y\":16.8},{\"x\":1676239112,\"y\":16.9},{\"x\":1676239114,\"y\":16.8},{\"x\":1676239117,\"y\":16.9},{\"x\":1676239118,\"y\":16.8},{\"x\":1676239125,\"y\":16.9},{\"x\":1676239126,\"y\":16.8},{\"x\":1676239127,\"y\":16.9},{\"x\":1676239128,\"y\":16.8},{\"x\":1676239129,\"y\":16.9},{\"x\":1676239130,\"y\":16.8},{\"x\":1676239136,\"y\":16.9},{\"x\":1676239138,\"y\":16.8},{\"x\":1676239144,\"y\":16.9},{\"x\":1676239145,\"y\":16.8},{\"x\":1676239147,\"y\":16.9},{\"x\":1676239148,\"y\":16.8},{\"x\":1676239149,\"y\":16.9},{\"x\":1676239150,\"y\":16.8},{\"x\":1676239151,\"y\":16.9},{\"x\":1676239153,\"y\":16.8},{\"x\":1676239162,\"y\":16.9},{\"x\":1676239163,\"y\":16.8},{\"x\":1676239164,\"y\":16.9},{\"x\":1676239165,\"y\":16.8},{\"x\":1676239167,\"y\":16.9},{\"x\":1676239168,\"y\":16.8},{\"x\":1676239170,\"y\":16.9},{\"x\":1676239173,\"y\":16.8},{\"x\":1676239175,\"y\":16.9},{\"x\":1676239178,\"y\":16.8},{\"x\":1676239182,\"y\":16.9},{\"x\":1676239183,\"y\":16.8},{\"x\":1676239196,\"y\":16.7},{\"x\":1676239197,\"y\":16.8},{\"x\":1676239202,\"y\":16.7},{\"x\":1676239203,\"y\":16.8},{\"x\":1676239206,\"y\":16.7},{\"x\":1676239210,\"y\":16.8},{\"x\":1676239211,\"y\":16.7},{\"x\":1676239216,\"y\":16.8},{\"x\":1676239217,\"y\":16.7},{\"x\":1676239246,\"y\":16.6},{\"x\":1676239246,\"y\":16.7},{\"x\":1676239247,\"y\":16.6},{\"x\":1676239289,\"y\":16.5},{\"x\":1676239290,\"y\":16.6},{\"x\":1676239291,\"y\":16.5},{\"x\":1676239293,\"y\":16.6},{\"x\":1676239297,\"y\":16.5},{\"x\":1676239298,\"y\":16.6},{\"x\":1676239299,\"y\":16.5},{\"x\":1676239304,\"y\":16.6},{\"x\":1676239305,\"y\":16.5},{\"x\":1676239306,\"y\":16.6},{\"x\":1676239307,\"y\":16.5},{\"x\":1676239310,\"y\":16.6},{\"x\":1676239311,\"y\":16.5},{\"x\":1676239350,\"y\":16.4},{\"x\":1676239351,\"y\":16.5},{\"x\":1676239368,\"y\":16.4},{\"x\":1676239369,\"y\":16.5},{\"x\":1676239375,\"y\":16.4},{\"x\":1676239376,\"y\":16.5},{\"x\":1676239648,\"y\":16.6},{\"x\":1676239649,\"y\":16.5},{\"x\":1676239656,\"y\":16.6},{\"x\":1676239658,\"y\":16.5},{\"x\":1676239666,\"y\":16.6},{\"x\":1676239667,\"y\":16.5},{\"x\":1676239673,\"y\":16.6},{\"x\":1676239674,\"y\":16.5},{\"x\":1676239680,\"y\":16.6},{\"x\":1676239682,\"y\":16.5},{\"x\":1676239683,\"y\":16.6},{\"x\":1676239685,\"y\":16.5},{\"x\":1676239687,\"y\":16.6},{\"x\":1676239688,\"y\":16.5},{\"x\":1676239690,\"y\":16.6},{\"x\":1676239691,\"y\":16.5},{\"x\":1676239693,\"y\":16.6},{\"x\":1676239695,\"y\":16.5},{\"x\":1676239699,\"y\":16.6},{\"x\":1676239700,\"y\":16.5},{\"x\":1676239709,\"y\":16.6},{\"x\":1676239711,\"y\":16.5},{\"x\":1676239738,\"y\":16.6},{\"x\":1676239739,\"y\":16.5},{\"x\":1676239747,\"y\":16.6},{\"x\":1676239748,\"y\":16.5},{\"x\":1676240006,\"y\":16.6},{\"x\":1676240007,\"y\":16.5},{\"x\":1676240025,\"y\":16.6},{\"x\":1676240028,\"y\":16.5},{\"x\":1676240029,\"y\":16.6},{\"x\":1676240030,\"y\":16.5},{\"x\":1676240037,\"y\":16.6},{\"x\":1676240039,\"y\":16.5},{\"x\":1676240042,\"y\":16.6},{\"x\":1676240046,\"y\":16.5},{\"x\":1676240047,\"y\":16.6},{\"x\":1676240053,\"y\":16.5},{\"x\":1676240054,\"y\":16.6},{\"x\":1676240061,\"y\":16.5},{\"x\":1676240062,\"y\":16.6},{\"x\":1676240066,\"y\":16.5},{\"x\":1676240067,\"y\":16.6},{\"x\":1676240214,\"y\":16.7},{\"x\":1676240215,\"y\":16.6},{\"x\":1676240221,\"y\":16.7},{\"x\":1676240222,\"y\":16.6},{\"x\":1676240232,\"y\":16.7},{\"x\":1676240233,\"y\":16.6},{\"x\":1676240237,\"y\":16.7},{\"x\":1676240239,\"y\":16.6},{\"x\":1676240242,\"y\":16.7},{\"x\":1676240243,\"y\":16.6},{\"x\":1676240245,\"y\":16.7},{\"x\":1676240246,\"y\":16.6},{\"x\":1676240248,\"y\":16.7},{\"x\":1676240255,\"y\":16.6},{\"x\":1676240256,\"y\":16.7},{\"x\":1676240258,\"y\":16.6},{\"x\":1676240259,\"y\":16.7},{\"x\":1676240260,\"y\":16.6},{\"x\":1676240266,\"y\":16.7},{\"x\":1676240267,\"y\":16.6},{\"x\":1676240270,\"y\":16.7},{\"x\":1676240271,\"y\":16.6},{\"x\":1676240595,\"y\":16.7},{\"x\":1676240596,\"y\":16.6},{\"x\":1676240600,\"y\":16.7},{\"x\":1676240601,\"y\":16.6},{\"x\":1676240615,\"y\":16.7},{\"x\":1676240619,\"y\":16.6},{\"x\":1676240620,\"y\":16.7},{\"x\":1676240622,\"y\":16.6},{\"x\":1676240623,\"y\":16.7},{\"x\":1676240624,\"y\":16.6},{\"x\":1676240634,\"y\":16.7},{\"x\":1676240636,\"y\":16.6},{\"x\":1676240638,\"y\":16.7},{\"x\":1676240639,\"y\":16.6},{\"x\":1676240643,\"y\":16.7},{\"x\":1676240645,\"y\":16.6},{\"x\":1676240646,\"y\":16.7},{\"x\":1676240648,\"y\":16.6},{\"x\":1676240651,\"y\":16.7},{\"x\":1676240653,\"y\":16.6},{\"x\":1676240654,\"y\":16.7},{\"x\":1676240656,\"y\":16.6},{\"x\":1676240661,\"y\":16.7},{\"x\":1676240662,\"y\":16.6},{\"x\":1676240668,\"y\":16.7},{\"x\":1676240669,\"y\":16.6},{\"x\":1676240675,\"y\":16.7},{\"x\":1676240676,\"y\":16.6},{\"x\":1676240798,\"y\":16.5},{\"x\":1676240799,\"y\":16.6},{\"x\":1676240884,\"y\":16.5},{\"x\":1676240886,\"y\":16.6},{\"x\":1676240893,\"y\":16.5},{\"x\":1676240894,\"y\":16.6},{\"x\":1676240898,\"y\":16.5},{\"x\":1676240899,\"y\":16.6},{\"x\":1676240903,\"y\":16.5},{\"x\":1676240904,\"y\":16.6},{\"x\":1676240905,\"y\":16.5},{\"x\":1676240907,\"y\":16.6},{\"x\":1676240911,\"y\":16.5},{\"x\":1676240914,\"y\":16.6},{\"x\":1676240917,\"y\":16.5},{\"x\":1676240918,\"y\":16.6},{\"x\":1676240924,\"y\":16.5},{\"x\":1676240925,\"y\":16.6},{\"x\":1676240932,\"y\":16.5},{\"x\":1676240933,\"y\":16.6},{\"x\":1676240936,\"y\":16.5},{\"x\":1676240940,\"y\":16.6},{\"x\":1676240942,\"y\":16.5},{\"x\":1676240944,\"y\":16.6},{\"x\":1676240945,\"y\":16.5},{\"x\":1676240951,\"y\":16.6},{\"x\":1676240952,\"y\":16.5},{\"x\":1676241255,\"y\":16.6},{\"x\":1676241256,\"y\":16.5},{\"x\":1676241276,\"y\":16.6},{\"x\":1676241277,\"y\":16.5},{\"x\":1676241283,\"y\":16.6},{\"x\":1676241284,\"y\":16.5},{\"x\":1676241285,\"y\":16.6},{\"x\":1676241289,\"y\":16.5},{\"x\":1676241290,\"y\":16.6},{\"x\":1676241291,\"y\":16.5},{\"x\":1676241292,\"y\":16.6},{\"x\":1676241297,\"y\":16.5},{\"x\":1676241300,\"y\":16.6},{\"x\":1676241301,\"y\":16.5},{\"x\":1676241306,\"y\":16.6},{\"x\":1676241308,\"y\":16.5},{\"x\":1676241310,\"y\":16.6},{\"x\":1676241311,\"y\":16.5},{\"x\":1676241313,\"y\":16.6},{\"x\":1676241314,\"y\":16.5},{\"x\":1676241315,\"y\":16.6},{\"x\":1676241316,\"y\":16.5},{\"x\":1676241317,\"y\":16.6},{\"x\":1676241318,\"y\":16.5},{\"x\":1676241319,\"y\":16.6},{\"x\":1676241327,\"y\":16.5},{\"x\":1676241330,\"y\":16.6},{\"x\":1676241332,\"y\":16.5},{\"x\":1676241333,\"y\":16.6},{\"x\":1676241382,\"y\":16.5},{\"x\":1676241384,\"y\":16.6},{\"x\":1676241416,\"y\":16.5},{\"x\":1676241417,\"y\":16.6},{\"x\":1676241423,\"y\":16.5},{\"x\":1676241424,\"y\":16.6},{\"x\":1676241451,\"y\":16.5},{\"x\":1676241453,\"y\":16.6},{\"x\":1676241457,\"y\":16.5},{\"x\":1676241458,\"y\":16.6},{\"x\":1676241465,\"y\":16.5},{\"x\":1676241466,\"y\":16.6},{\"x\":1676241689,\"y\":16.7},{\"x\":1676241690,\"y\":16.6},{\"x\":1676241984,\"y\":16.5},{\"x\":1676241985,\"y\":16.6},{\"x\":1676241988,\"y\":16.5},{\"x\":1676241991,\"y\":16.6},{\"x\":1676241993,\"y\":16.5},{\"x\":1676241996,\"y\":16.6},{\"x\":1676241998,\"y\":16.5},{\"x\":1676242000,\"y\":16.6},{\"x\":1676242001,\"y\":16.5},{\"x\":1676242010,\"y\":16.6},{\"x\":1676242012,\"y\":16.5},{\"x\":1676242037,\"y\":16.6},{\"x\":1676242038,\"y\":16.5},{\"x\":1676242093,\"y\":16.6},{\"x\":1676242094,\"y\":16.5},{\"x\":1676242101,\"y\":16.6},{\"x\":1676242102,\"y\":16.5},{\"x\":1676242105,\"y\":16.6},{\"x\":1676242107,\"y\":16.5},{\"x\":1676242114,\"y\":16.6},{\"x\":1676242115,\"y\":16.5},{\"x\":1676242122,\"y\":16.6},{\"x\":1676242124,\"y\":16.5},{\"x\":1676242125,\"y\":16.6},{\"x\":1676242126,\"y\":16.5},{\"x\":1676242130,\"y\":16.6},{\"x\":1676242133,\"y\":16.5},{\"x\":1676242134,\"y\":16.6},{\"x\":1676242136,\"y\":16.5},{\"x\":1676242140,\"y\":16.6},{\"x\":1676242142,\"y\":16.5},{\"x\":1676242144,\"y\":16.6},{\"x\":1676242147,\"y\":16.5},{\"x\":1676242149,\"y\":16.6},{\"x\":1676242152,\"y\":16.5},{\"x\":1676242153,\"y\":16.6},{\"x\":1676242161,\"y\":16.5},{\"x\":1676242162,\"y\":16.6},{\"x\":1676242163,\"y\":16.5},{\"x\":1676242165,\"y\":16.6},{\"x\":1676242169,\"y\":16.5},{\"x\":1676242170,\"y\":16.6},{\"x\":1676242178,\"y\":16.5},{\"x\":1676242179,\"y\":16.6},{\"x\":1676242180,\"y\":16.5},{\"x\":1676242181,\"y\":16.6},{\"x\":1676242183,\"y\":16.5}]",
        "payloadType": "json",
        "x": 830,
        "y": 1080,
        "wires": [
            [
                "f9eb44a9.6564b8"
            ]
        ]
    },
    {
        "id": "f9eb44a9.6564b8",
        "type": "function",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "name": "Format data",
        "func": "let x = [];\nlet y = [];\n\nvar id_sensor = global.get('device_escolhido');\nvar sensor = global.get('sensor_escolhido');\nmsg.topic = id_sensor + \"/\" + sensor;\nmsg.topic = msg.topic.toUpperCase();\n\n// function to add leading zeros to date/times\nfunction LZ(n){\n     if(n <= 9){return \"0\" + n;}\n     return n}\n \nfor (var i in msg.payload) {\n        // Fix to display UTC timestamp in Local Timezone\n    x[i] = new Date((msg.payload[i].x)*1000);\n    x[i] = x[i].getFullYear() + \"-\" + LZ(x[i].getMonth() + 1) + \"-\" + LZ(x[i].getDate()) + \" \" + LZ(x[i].getHours()) + \":\" + LZ(x[i].getMinutes()) + \":\" + LZ(x[i].getSeconds());\n    y[i] = (msg.payload[i].y).toFixed(2);\n}\n\nmsg.payload = {\"y\":y,\"x\":x};\nreturn msg;\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1010,
        "y": 1060,
        "wires": [
            [
                "ec5d8a0fd02e5777",
                "186a043f9171a282"
            ]
        ]
    },
    {
        "id": "ec5d8a0fd02e5777",
        "type": "ui_template",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "group": "dcca25c6128f11d2",
        "name": "Example 3",
        "order": 3,
        "width": "12",
        "height": 8,
        "format": "<div id=\"example3\"></div>\n<script>\n\n// Initialize chart\nvar layout = {\n    title:'Awaiting data',\n    };\nvar data = [{x:[0],y:[0]}];\nPlotly.newPlot('example3', data, layout);\n\n// Update data & layout\n(function(scope) {\n  scope.$watch('msg', function(msg) {\n    if (msg) {\n        \n\n    var gustdata = {\n        x:msg.payload.x,\n        y:msg.payload.y,\n        name: 'wind-gust',\n        mode: 'lines+markers',\n        line: {\n           dash: 'solid',\n           color: '#ff0000'\n            },\n        yaxis: 'y2',\n        connectgaps: true\n     };\n\nvar data = [gustdata];\n\n    var layout = {\n    title: msg.topic,\n    titlefont: {\n        size: 22,\n        },\n    showlegend: false,\n    plot_bgcolor: '#ffffff',\n    paper_bgcolor: '#ffffff',\n    'yaxis2': {\n        title: 'Medidas',\n        //range: [0, 35],\n        color: '#ff0000',\n        overlaying: 'y',\n        side: 'right'\n        },\n    'xaxis': {\n        title: 'Time recorded',\n       'tickformat': '%d-%m-%Y %H:%M'\n        }\n    };\n\n      console.log(data,layout)\n      Plotly.newPlot('example3', data, layout, { modeBarButtonsToRemove: ['toImage','toggleSpikelines'], displaylogo: false})\n     };\n  });\n})(scope);\n</script>\n",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 1210,
        "y": 1140,
        "wires": [
            []
        ]
    },
    {
        "id": "1a30326222494de9",
        "type": "ui_template",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "group": "",
        "name": "Load Plotly local",
        "order": 17,
        "width": 0,
        "height": 0,
        "format": "<script src=\"/plotly-2.18.0.min.js\"></script>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "global",
        "className": "",
        "x": 1420,
        "y": 1040,
        "wires": [
            []
        ]
    },
    {
        "id": "186a043f9171a282",
        "type": "debug",
        "z": "8eee6e26.470a3",
        "g": "4c9df94c6ddc383c",
        "name": "debug 7",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1200,
        "y": 960,
        "wires": []
    },
    {
        "id": "dcca25c6128f11d2",
        "type": "ui_group",
        "name": "BUSCA POR DROPDOWN OK",
        "tab": "ca908d3793e94198",
        "order": 1,
        "disp": true,
        "width": "12",
        "collapse": false,
        "className": ""
    },
    {
        "id": "ca908d3793e94198",
        "type": "ui_tab",
        "name": "DB READING",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.