Gojs graph strings do not overlap

gojs graph strings do not overlap. How to fix this.


My Code:

this.diagram.grid = goMake(go.Panel, "Grid",
                {
                    gridCellSize: new go.Size(8, 8)
                },
                goMake(go.Shape, "LineH", { stroke: "#eaeaea", strokeDashArray: [1, 1] }),
                goMake(go.Shape, "LineV", { stroke: "#eaeaea", strokeDashArray: [1, 1] }),
                goMake(go.Shape, "LineH", { stroke: "#d7e8fa", interval: 4, strokeDashArray: [1, 1] }),
                goMake(go.Shape, "LineV", { stroke: "#d7e8fa", interval: 4, strokeDashArray: [1, 1] })
            );

I see what you have circled in the screenshot, but I do not understand what you want instead.

I suggest that you try setting https://gojs.net/latest/api/symbols/Shape.html#strokeDashOffset to various values to see if you can get the results that you want.

I want the boxes on top of each other. Like I made it in the visual.

I have assigned the strokeDashOffset value, but nothing has changed.

I want it like in the image

That’s odd – I expected that setting Shape.strokeDashOffset would have worked. We’ll investigate.

Try setting strokeDashOffset to 0.5 for each of your Shapes. That should provide the result you want:

image