I am getting the gray rectangle once I select the category and its gets invisible once I select to and from arrow.

We have link template defined as below
myDiagram.linkTemplateMap.add("Dotted",
$(go.Link,
{
layerName: "Background",
corner: 15,
reshapable: true,
resegmentable: true,
fromSpot: go.Spot.RightSide,
toSpot: go.Spot.LeftSide
},
new go.Binding("routing", "connector", connectorFunc),
new go.Binding("fromSpot", "fromSpot", go.Spot.parse),
new go.Binding("toSpot", "toSpot", go.Spot.parse),
new go.Binding("points").makeTwoWay(),
$(go.Shape, { strokeDashArray: [4, 2] }, new go.Binding("stroke", "color", colorFunc)),
$(go.Shape, { fill: 'gray', stroke: null },
new go.Binding("fromArrow", "fromarrowOption", fromarrowFunc)
),
$(go.Shape, { fill: 'gray', stroke: null },
new go.Binding("toArrow", "toarrowOption", toarrowFunc),
)
));
We does not like to have this rectangle box.