Need a sortable (ascending)nodes for flowgraph like below shown:
I am using following layout structure in my code:
Need a solution to handle it…please give some examples also…
Thank you
Need a sortable (ascending)nodes for flowgraph like below shown:
I am using following layout structure in my code:
Need a solution to handle it…please give some examples also…
Thank you
There is an example of providing a TreeLayout.comparer function at the end of GoJS Trees -- Northwoods Software.
By the way, you have two layouts in your Diagram initialization. Only the last assignment matters.
my flowgraph has 4 levels of nodes and each level of node should sort asceding(like left to right-it should be in alphabatical order)
for example:
my actual code is below here:
var $ = go.GraphObject.make;
myDiagram =
$(go.Diagram, "myDiagramDiv",
{
"toolManager.hoverDelay": 100,
allowVerticalScroll: true,
initialDocumentSpot: go.Spot.Top,
initialViewportSpot: go.Spot.Top,
// autoScale: go.Diagram.Uniform,
allowCopy: false,
initialContentAlignment: go.Spot.Top,
"draggingTool.dragsTree": false,
"commandHandler.deletesTree": false,
layout:
$(go.TreeLayout,
{ angle: 90, arrangement: go.TreeLayout.ArrangementFixedRoots,alignment: go.TreeLayout.AlignmentCenterSubtrees,layerSpacing: 110,nodeSpacing :80, comparer: keyCompare , sorting: go.TreeLayout.SortingAscending }),
"undoManager.isEnabled": true
});
Can you please tell me how make the each level of node to sort ascending by this code
can you please give a detailed flow for this method
In what manner is the documentation at TreeLayout | GoJS API insufficient?