Hi Walter,
I am using GoJS in my project. I want add additional data to the node which is in JSON format and i have different data for each node.
I am using angular 5;
nodedataArray = [{
key: 3,
text: 'Expression Evaluator',
figure: 'RoundedRectangle',
fill: 'lightskyblue',
source: 'assets/ExpressionEvaluator.png',
leftArray: [{ 'portId': 'portleft' }],
rightArray: [{ 'portId': 'portright' }],
'loc': '-120.33334350585938 10.66666665673256'},{
key: 4, text: 'DeviceType', figure: 'RoundedRectangle', fill: '#ff8080',
source: 'assets/DeviceTypeSelector.png', leftArray: [],
rightArray: [{ 'portId': 'right0' }, { 'portId': 'right1' }], 'loc': '-351.3333435058594 9.66666665673256'
}];
i want to add my json as
data
inside node which will come from server.
nodedataArray = [{
key: 3,
text: 'Expression Evaluator',
figure: 'RoundedRectangle',
fill: 'lightskyblue',
data: [
{
"allowApplicationActivation": false,
"class": "gateway",
"model": "ModelQA",
"name": "uppercase",
"typeId": {
"category": "01",
"manufacturer": "ADD1"
}
},
{
"allowApplicationActivation": false,
"class": "gateway",
"model": "mtcdt-lcdt",
"name": "lightweight",
"typeId": {
"category": "01",
"manufacturer": "ADSG"
}
},
{
"allowApplicationActivation": false,
"class": "sensor",
"model": "m2018",
"name": "amnimotseries",
"typeId": {
"category": "00",
"manufacturer": "AMNM"
}
}],
source: 'assets/ExpressionEvaluator.png',
leftArray: [{ 'portId': 'portleft' }],
rightArray: [{ 'portId': 'portright' }],
'loc': '-120.33334350585938 10.66666665673256' }];
so that i can access the data in typescript when i want to show the properties of specific node, please help me.
Thanks in advance!