GoJS 弯曲点到移动点

GoJS bendpoints to shifting points

我有一个非常简单的图表,我正在努力实现连接线将具有 'bendpoints' 或 'shiftpoints',但该图表忽略了我的绑定('points' ).我在监督什么吗?

link连接JSON:

[{"id":"Id-4db7b23b","from":"Id-fd544004","to":"Id-a94b6967","label":"","strokewidth":1,"font":"8px Arial","fontcolor":"rgb(0,0,0)","fillcolor":"rgb(238,238,238)","style":"solid","arrowhead":"empty","bendpoints":[["335","363"],["550","234"]]}]

其中弯点是 X/Y 值。

源图:http://jsfiddle.net/rb7nyxfd/42/

两个问题:如果你使用Model.fromJson,link数据属性需要命名为"points",格式必须是数字数组,而不是字符串数组。所以...

将 Link 的绑定更改为:new go.Binding("points", "points")

将 link 数据更改为:"points":[335,363,550,234].