Subtrees program problem's with GoJs


#1

Hello,please I need your help to find the mistake in this code, because il doesn’t work at all.
I want to have like this tree in the picture below.
This is my code :


#2

I don’t see any code in which we could possibly find any errors.


#3

Sorry,I edited the post,the code is in the two pictures.Thank u for your help!


#4

Posting code in images rather than as text makes it hard to read and impossible to try or modify or comment.

What is the precise nature of your problem? What is happening and what do you want to keep the same and what do you want to be different? Screenshots of diagrams, before and after, help a lot.


#5

You don’t have a consistent diagram throughout your program. You’re referencing something by Diagram, diagram, and myDiagram in different places, and you never initialized it. You also don’t seem to have an actual HTML div to hold the diagram. Look at some of the samples to see how we typically do it.

In general, we can’t do basic debugging of your code.


#6

I put the code in this file to make it easy to correct the errors.My purpose is to have the diagram in the picture .I took the functions from GoJS library website.
https://gojs.net/latest/intro/subtrees.html
My code:
https://drive.google.com/open?id=11Vq2fxBLUAyIv9zyzDLtp-IsnwnD70yW


#7

It’s better to post your code here, formatted nicely.

What’s the value of “diagram”? Where is it initialized?

Have you stepped through your code in the debugger and found the cause of the errors that you are getting?