I’m trying to implement the following design.
I need to have label on the link. And connection should not go through text, it should not be visible around the label.
How can I achieve it?
I’m trying to implement the following design.
I need to have label on the link. And connection should not go through text, it should not be visible around the label.
How can I achieve it?
The obvious thing to try is to set the TextBlock.background to “white” or whatever your background color is. However, the GraphObject.background only paints the rectangular area of that GraphObject, not any beyond it as your screenshot shows.
So you’ll need to wrap the TextBlock in a Panel that has its background set to “white”, and set the TextBlock.margin to new go.Margin(0, 6)
or something like that:
new go.Panel({ background: "white", segmentOrientation: go.Orientation.Upright })
.add(
new go.TextBlock("Label", { margin: new go.Margin(0, 6) })
)
@walter thank you! I had considered this solution, but I was wondering if there was a built-in way to handle it.