The value of key and id in json

How does key set up auto-ascending?Why is the id constant?
For example,The ID is auto-increment.

Note in the State Chart sample model:

"nodeKeyProperty": "id",


     <textarea id="mySavedModel" style="width:100%;height:300px">
     { "class":"go.GraphLinksModel", 
    "linkFromPortIdProperty": "fromPort",
    "linkToPortIdProperty": "toPort",
    "nodeKeyProperty": "id",
    "nodeDataArray": [],
    "linkDataArray": []}


Did I do something wrong?Why do we get different results from this example?

Also, I want Node and Link to have their own ids, and id number is not repeated

Your textarea still does not have "nodeKeyProperty": "id", in it, according to your screenshot. Hard reload your page?

For link data keys, set GraphLinksModel | GoJS API