Skip to content

Instantly share code, notes, and snippets.

@vongomben
Created April 11, 2024 14:24
Show Gist options
  • Save vongomben/38aaf74063a752e5ef387212732bfc52 to your computer and use it in GitHub Desktop.
Save vongomben/38aaf74063a752e5ef387212732bfc52 to your computer and use it in GitHub Desktop.
[
{
"id": "c0175018f530ce4d",
"type": "comment",
"z": "e23266e26abe114f",
"name": "Creiamo una nuova pagina web",
"info": "",
"x": 710,
"y": 1820,
"wires": []
},
{
"id": "7c314af9bc73ab23",
"type": "comment",
"z": "e23266e26abe114f",
"name": "il primo gruppo (di larghezza 6) conterrà una slider",
"info": "",
"x": 630,
"y": 1860,
"wires": []
},
{
"id": "540e1f4e95be8985",
"type": "comment",
"z": "e23266e26abe114f",
"name": "il secondo gruppo (di larghezza 12) graficizza il dato",
"info": "",
"x": 630,
"y": 1900,
"wires": []
},
{
"id": "396520bdb38709cf",
"type": "comment",
"z": "e23266e26abe114f",
"name": "aggiungiamo un nodo tra slider e grafico che randomizza il \"dato 1\" in base 100",
"info": "",
"x": 720,
"y": 1940,
"wires": []
},
{
"id": "224c6006b04ad37f",
"type": "comment",
"z": "e23266e26abe114f",
"name": "aggiungiamo un secondo nodo tra slider e grafico che randomizza un secondo \"dato 2\" in base 10. entrambi i dati verranno visualizzati nel grafico",
"info": "",
"x": 800,
"y": 1980,
"wires": []
},
{
"id": "e702d0f6c69e7e23",
"type": "comment",
"z": "e23266e26abe114f",
"name": "aggiungiamo un bottone che pulisca i grafici",
"info": "",
"x": 610,
"y": 2020,
"wires": []
},
{
"id": "aca5f13f84a6ccf5",
"type": "ui_slider",
"z": "e23266e26abe114f",
"name": "",
"label": "slider",
"tooltip": "",
"group": "fab78bc014cc63bc",
"order": 0,
"width": 0,
"height": 0,
"passthru": true,
"outs": "all",
"topic": "topic",
"topicType": "msg",
"min": 0,
"max": "100",
"step": 1,
"className": "",
"x": 350,
"y": 2120,
"wires": [
[
"fdbc26f626f18d39",
"e36b76607851d372"
]
]
},
{
"id": "10f2cbaa1f6e9c38",
"type": "ui_chart",
"z": "e23266e26abe114f",
"name": "",
"group": "4e993dd864f7a7ba",
"order": 2,
"width": 0,
"height": 0,
"label": "chart",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": 1,
"removeOlderPoints": "",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 870,
"y": 2120,
"wires": [
[]
]
},
{
"id": "fdbc26f626f18d39",
"type": "change",
"z": "e23266e26abe114f",
"name": "Randomizzo \"Dato 1\" moltiplicandolo per 100",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$random()*100",
"tot": "jsonata"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Dato 1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
"y": 2100,
"wires": [
[
"10f2cbaa1f6e9c38"
]
]
},
{
"id": "e36b76607851d372",
"type": "change",
"z": "e23266e26abe114f",
"name": "Randomizzo \"Dato 2\" moltiplicandolo per 10",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$random()*10",
"tot": "jsonata"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Dato 2",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
"y": 2140,
"wires": [
[
"10f2cbaa1f6e9c38"
]
]
},
{
"id": "1f600ce32ed23d1c",
"type": "ui_button",
"z": "e23266e26abe114f",
"name": "",
"group": "fab78bc014cc63bc",
"order": 1,
"width": 0,
"height": 0,
"passthru": false,
"label": "Pulisci",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 510,
"y": 2200,
"wires": [
[
"a24bb4186b5699a3"
]
]
},
{
"id": "a24bb4186b5699a3",
"type": "change",
"z": "e23266e26abe114f",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "[]",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 700,
"y": 2200,
"wires": [
[
"10f2cbaa1f6e9c38"
]
]
},
{
"id": "fab78bc014cc63bc",
"type": "ui_group",
"name": "Group 1",
"tab": "56ca573f9aeedc27",
"order": 1,
"disp": true,
"width": 6
},
{
"id": "4e993dd864f7a7ba",
"type": "ui_group",
"name": "Group 2",
"tab": "56ca573f9aeedc27",
"order": 2,
"disp": true,
"width": "12",
"collapse": false,
"className": ""
},
{
"id": "56ca573f9aeedc27",
"type": "ui_tab",
"name": "nuova pagina",
"icon": "dashboard",
"order": 2,
"disabled": false,
"hidden": false
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment