@akashskan wrote:
Hi,
I have a set of data in which I’m passing x and y co-ordinate of node and I’m binding that position using
new go.Binding("location", "loc", go.Point.parse)and it is working very well.Similarly, I have a string/Array of points for each link in my linkDataArray, but links do not follow the coordinate points. I have tried Link.points and new Binding(“points”) etc., but, yet to get desire result.
my sample data
{ 'class': 'GraphLinksModel', 'nodeKeyProperty': 'id', 'nodeDataArray': [ { 'id': 'AAAAAAAAAAAAA', 'loc': '546.336 -230.3', 'text': 'AAAAAAAAAAAAA' }, { 'id': 'BBBBBBBBBBBBBBBB', 'loc': '516.336 -158.3', 'text': 'BBBBBBBBBBBBBBBB' }, { 'id': 'DDDDDDDDDDDDDD', 'loc': '427.336 -86.3', 'text': 'DDDDDDDDDDDDDD' }, { 'id': 'SEEEEEEEEEEEEEEEE', 'loc': '839.336 -14.3', 'text': 'SEEEEEEEEEEEEEEEE' }, { 'id': 'FFFFFFFFFFFFF', 'loc': '155.336 -158.3', 'text': 'FFFFFFFFFFFFF' }, { 'id': 'GGGGGGGGG', 'loc': '839.336 -86.3', 'text': 'GGGGGGGGG' } ], 'linkDataArray': [ { 'from': 'BBBBBBBBBBBBBBBB', 'to': 'DDDDDDDDDDDDDD', 'points': "1488.914, -1144.055476, -1135.179, 1462.509, -1124.169, 1450.779, -1114.483", 'text': 1138.0, 'strokeWidth': 6 }, { 'from': 'BBBBBBBBBBBBBBBB', 'to': 'GGGGGGGGG', 'points': "85.628, -145.983636, -135.02, 704.959, -120.122, 758.128, -108.599", 'text': 582.0, 'strokeWidth': 4 }, { 'from': 'DDDDDDDDDDDDDD', 'to': 'BBBBBBBBBBBBBBBB', 'points': "454.878, -108.032467, -116.922, 481.294, -127.934, 493.008, -137.611", 'text': 1199.0, 'strokeWidth': 6 }, { 'from': 'FFFFFFFFFFFFF', 'to': 'AAAAAAAAAAAAA', 'points': "83.023, -179.789195, -188.706, 210.19, -199.808, 222.278, -209.562", 'text': 1097.0, 'strokeWidth': 6 }, { 'from': 'GGGGGGGGG', 'to': 'SEEEEEEEEEEEEEEEE', 'points': "839.336, -71.6966839, -63.9827, 839.336, -54.7125, 839.336, -46.1124", 'text': 451.0, 'strokeWidth': 4 }, { 'from': 'AAAAAAAAAAAAA', 'to': 'FFFFFFFFFFFFF', 'points': "218.68, -216.233206, -207.36, 191.648, -196.318, 179.588, -186.594", 'text': 946.0, 'strokeWidth': 6 }, { 'from': 'AAAAAAAAAAAAA', 'to': 'DDDDDDDDDDDDDD', 'points': `271.271, -216.107285, -206.06, 303.916, -192.81, 319.336, -180, 337.232, -165.134, 339.591, -159.045, 357.336, -144, 369.428, -133.748, 383.248, -123.079, 395.397, -114.023`, 'text': 685.0, 'strokeWidth': 4 }, { 'from': 'AAAAAAAAAAAAA', 'to': 'BBBBBBBBBBBBBBBB', 'points': "305.589, -217.638347, -206.862, 402.879, -192.415, 446.589, -181.083", 'text': ' 838.0', 'strokeWidth': 4 } ] }
Posts: 2
Participants: 2