toolTip property
This Adornment or HTMLInfo is shown when the mouse hovers over this object. The default value is null, which means no tooltip is shown.
A typical tooltip is defined in the following manner, as taken from the Kitten Monitor sample:
myDiagram.nodeTemplate =
$(go.Node,
. . .
{ // this tooltip shows the name and picture of the kitten
toolTip:
$("ToolTip",
$(go.Panel, "Vertical",
$(go.Picture,
new go.Binding("source", "src", s => return "images/" + s + ".png")),
$(go.TextBlock, { margin: 3 },
new go.Binding("text", "key"))))
});
Note that this Adornment depends on having the same data binding as the adorned Part (i.e. the same value for Panel#data).
Tooltips are not copied by #copy, so that tooltips may be shared by all instances of a template.
Tooltips are shown after a timed delay given by the ToolManager#hoverDelay. You can change the delay time by:
myDiagram = new go.Diagram("myDiagramDiv",
{ "toolManager.hoverDelay": 500 }); // 500 milliseconds
or:
myDiagram.toolManager.hoverDelay = 500; // 500 milliseconds
Tooltips are normally positioned by ToolManager#positionToolTip. However, if there is a Placeholder in the tooltip, the tooltip (i.e. an Adornment) will be positioned so that the Placeholder is at the same position as this adorned GraphObject.
Replacing this value will not modify or remove any existing tooltip that is being shown for this object.
Read more about tooltips at ToolTips.
Implementation
_i2.dynamic get toolTip => _i4.getProperty(
this,
'toolTip',
);
Implementation
set toolTip(_i2.dynamic value) {
_i4.setProperty(
this,
'toolTip',
value,
);
}