I hava a problem about the link.curve in the group.I setted this property,but it didn’t work …This is my code:
this.myDiagram.linkTemplateMap.add(‘gray’, this.$(go.Link, // the whole link panel
{
curve: go.Link.Bezier,
curviness: 1500,
adjusting: go.Link.Stretch,
toShortLength: 3,
},
this.$(go.Shape, // the link shape
{
stroke: '#717171', strokeWidth: 2.5, fill: 'red',
strokeDashArray: [3, 2],
}),
new go.Binding('points').makeTwoWay(),
new go.Binding('curviness', 'curviness').makeTwoWay(),
));
public renderGroup(): void {
if (this.myDiagram) {
this.myDiagram.groupTemplate =
this.$(go.Group, 'Vertical',
{
layout: this.$(go.LayeredDigraphLayout, {
direction: 90,
linkSpacing: 0,
columnSpacing: 0,
layerSpacing: 0,
setsPortSpots: false,
},
),
selectionAdornmentTemplate: this.$(go.Adornment, 'Auto', this.$(go.Shape, 'Rectangle', { fill: 'white', stroke: null }),),
isSubGraphExpanded: true,
},
this.$(go.Panel, 'Auto',
this.$(go.Shape, 'RoundedRectangle', // surrounds the Placeholder
{
parameter1: 14,
fill: 'rgba(128,128,128,0)',
stroke: 'rgba(1, 1, 1, 0)',
}),
this.$(go.Placeholder, // represents the area of all member parts,
{ padding: 5 }), // with some extra padding around them
),
this.$(go.Panel, 'Horizontal'),
);
}
}
The group’s data is like:
nodeDataArray=[
{key:“1”,isGroup:true},
{key:“2”,isGroup:false,group:“1”},
{key:“3”,isGroup:false,group:“1”},
{key:“4”,isGroup:false,group:“1”},
{key:“5”,isGroup:false,group:“1”},
{key:“6”,isGroup:false,group:“1”}]
linkDataArray=[
{from:“3”,to:“2”category:‘gray’},
{from:“4”,to:“2”,category:‘gray’},
{from:“5”,to:“2”,category:‘gray’},
{ from:“6”,to:“2”,category:‘gray’ }
].