How to Implement LinkLabelRouter In GOJS Angular Component

I want to apply LinkLabelRouter to avoid link label overlapping.

label overlap:

How have you defined your link template?

Where is the LinkLabelRouter.js file and what are its import statements?

  1. Link Template:

  1. .js file Location: node_modules > gojs > extensions > LinkLabelRouter

  1. Here I have import statement:

I suspect that you want to import the LinkLabelRouter.js file that is in the extensionsJSM/ subfolder. That is an ES6 module; the one in extensions/ can only be loaded via a non-module <script> tag.

1)Location of imported Path:


  1. Imported LinkLabelRouter:

  2. Declared here: Got Undefined Error

4)Here Creating myDiagram:

Got undefined error on runtime

The Diagram.routers property is new in v3.0, so you must still be using v2.*. Evaluate go.version in the debugger.

  1. Console Error: ERROR TypeError: node_modules_gojs_extensionsJSM_LinkLabelRouter__WEBPACK_IMPORTED_MODULE_2__.LinkLabelRouter is not a constructor

  2. Add code here:

  3. Project / File Path Location:
    E:\DileepK\Project\NewProject\Angular_FrontEnd\node_modules\gojs\extensionsJSM

  4. Imported Path:

I assume you are now actually using [email protected].

Is that extension file actually at that path? In v3.0 we have moved all extensions and samples and documentation to the create-gojs-kit npm package which you can install anywhere by executing npm create gojs-kit.

I suggest that you read the change log, especially: Change Log | GoJS

2 posts were split to a new topic: Keeping link label on link path