Node Tooltip Issue - GraphObject.toolTip value is not an instance of Adornment

Hi Team,

While trying to set up a tooltip for my nodes, getting an error:

“GraphObject.toolTip value is not an instance of Adornment”

This is the code that i have inserted into my node for enabling tooltip:

{
toolTip:
$(go.Adornment, “Auto”,
$(go.Shape, { fill: “#FFFFCC” }),
$(go.TextBlock, { margin: 10 },
new go.Binding(“text”, “text”))
)
}

Can you please help ?

That’s odd. Your code certainly looks like it is assigning an Adornment to some GraphObject’s toolTip property. Maybe the problem is somewhere else.

Look at the stack to see who and why that error is happening. You are using go-debug.js, aren’t you?

Yes, i am using go-debug.js.

Here is the stack trace:

What is the value of “$” at the time that you are evaluating that code?

It points to jquery itself…

… not to go.GraphObject.make.

Here are the $ and $go values, Sorry i am not able to understand which value you are talking about.

Why aren’t you using go.GraphObject.make when constructing the Adornment?

You should not be using jQuery to build GoJS objects.

i understand that, But the same code that i have mentioned above, is working on other screens that i have, but not on one particular screen,

Also, i tried to put tooltip on GoJS canvas on the same page, it gives me this error:

Diagram.toolTip value is not an instance of Adornment: [object Object]

and the stack trace is -

Its strange, that these two tooltips are working fine on other screens that i have, but not on one particular screen. :frowning:

can i get any help on this issue please ?

Can you reproduce this issue in a codepen? I don’t understand why it would work on one screen but not another.