Look at the new Link Label On Path Dragging Tool and sample, Draggable Link Labels That Stay On Path.
You can easily add link labels to the link template. For example, for three of them, each individually draggable:
myDiagram.linkTemplate =
$(go.Link,
{
routing: go.Link.AvoidsNodes,
corner: 5,
relinkableFrom: true,
relinkableTo: true,
reshapable: true,
resegmentable: true
},
$(go.Shape),
$(go.Shape, { toArrow: "OpenTriangle" }),
$(go.Panel, "Auto",
{ _isLinkLabel: true }, // marks this Panel as being a draggable label
$(go.Shape, { fill: "white" }),
$(go.TextBlock, "?", { margin: 3 },
new go.Binding("text", "color")),
// remember any modified segment properties in the link data object
new go.Binding("segmentIndex").makeTwoWay(),
new go.Binding("segmentFraction").makeTwoWay()
),
$(go.Panel, "Auto",
{ _isLinkLabel: true, segmentIndex: 1, segmentFraction: 0.5 }, // marks this Panel as being a draggable label
$(go.Shape, { fill: "pink" }),
$(go.TextBlock, "?", { margin: 3 },
new go.Binding("text", "color2")),
// remember any modified segment properties in the link data object
new go.Binding("segmentIndex", "segmentIndex2").makeTwoWay(),
new go.Binding("segmentFraction", "segmentFraction2").makeTwoWay()
),
$(go.Panel, "Auto",
{ _isLinkLabel: true, segmentIndex: 3, segmentFraction: 0.5 }, // marks this Panel as being a draggable label
$(go.Shape, { fill: "lightgreen" }),
$(go.TextBlock, "?", { margin: 3 },
new go.Binding("text", "color3")),
// remember any modified segment properties in the link data object
new go.Binding("segmentIndex", "segmentIndex3").makeTwoWay(),
new go.Binding("segmentFraction", "segmentFraction3").makeTwoWay()
)
);
I think you can have a variable number by binding Panel.itemArray, although you might need to include any arrowhead(s) in your items.