1

I´m using Flowchart from http://gojs.net/latest/samples/flowchart.html and it is working fine. The only problem with it is, that it doesnt display the toolbar symbols which are shown in the example. Have someone usedFlowchart` too and had the same problem?

var $ = go.GraphObject.make;

myPalette =
                    $(go.Palette, "myPaletteDiv",  // must name or refer to the DIV HTML element
                        {
                            "animationManager.duration": 800, // slightly longer than default (600ms) animation
                            nodeTemplateMap: myDiagram.nodeTemplateMap,  // share the templates used by myDiagram
                            model: new go.GraphLinksModel([  // specify the contents of the Palette
                                {category: "Start", text: "Start"},
                                {text: "Step"},
                                {text: "???", figure: "Diamond"},
                                {category: "End", text: "End"},
                                {category: "Comment", text: "Comment"}
                            ])
                        });

Problem

enter image description here

2
  • Do you see any errors in your developer console? Commented Jan 9, 2017 at 11:45
  • Yes,This error facing in my developer console. Please add go js license in devloper console.This issue is resolved. Commented Jun 24, 2020 at 9:45

1 Answer 1

3

I think you are initializing the Palette before you have initialized the Diagram and its Diagram.nodeTemplateMap. This effectively means that the Palette is not using your custom templates, so the nodes in your Palette are using the default node template.

If you look at the source code in the Flowchart sample you'll see this:

// initialize the Palette that is on the left side of the page
myPalette =
  $(go.Palette, "myPaletteDiv",  // must name or refer to the DIV HTML element
    {
      "animationManager.duration": 800, // slightly longer than default (600ms) animation
      nodeTemplateMap: myDiagram.nodeTemplateMap,  // share the templates used by myDiagram
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.