Error while to use Tooltip


Closed now!

I try to use tool tips for my diagram ,and this what i found.

Below code I just provide my sample template to you, could help to tell me, what I was wrong?

myDiagram.nodeTemplateMap.add("", // the default category
$go(go.Node, “Spot”, nodeStyle(),
// the main object is a Panel that surrounds a TextBlock with a rectangular Shape
$go(go.Panel, “Auto”,
$go(go.Shape, “Rectangle”,
fill: “#666666”, stroke: null
new go.Binding(“figure”, “figure”)),
font: “bold 11pt Helvetica, Arial, sans-serif”,
//stroke: lightText,
margin: 8,

                        stroke: "#F3EFE8",
                        overflow: go.TextBlock.OverflowEllipsis,//go.TextBlock.OverflowClip,//go.TextBlock.OverflowEllipsis,
                        width: 150,
                        wrap: go.TextBlock.None,// go.TextBlock.WrapDesiredSize,//go.TextBlock.WrapFit,
                        editable: false,<span style="line-height: 1.4;">                          </span>
                        mouseOver: function (e,obj) {
                        mouseLeave: function (e) {
                        <span style="line-height: 1.4;">},</span>
                        doubleClick: function (e) {

                    new go.Binding("text", "text").makeTwoWay())
                { // this tooltip Adornment is shared by all nodes
                      $(go.Adornment, "Auto",
                        $(go.Shape, { fill: "#FFFFCC" }),
                        $(go.TextBlock, { margin: 4 },  // the tooltip shows the result of calling nodeInfo(data)
                          new go.Binding("text", "", linkInfo))
                // four named ports, one on each side:
                makePort("T", go.Spot.Top, false, true),
                makePort("L", go.Spot.Left, true, true),
                makePort("R", go.Spot.Right, true, true),
                makePort("B", go.Spot.Bottom, true, false)

    function linkInfo(d) {  // Tooltip info for a link data object
        return "Link:\nfrom " + d.from + " to " +;

Thanks for response.

  • -" Ok, No prob now , this is my false (which let me spend whole day stuck in this) ,I just define
    var $go = go.GraphObject.make;

but below code , I just use $…

Sorry pls skip this topic.