Search results

GridlinesModel API in JavaScript Diagram API control

Interface for a class Gridlines

Properties

dotIntervals

number[]

A pattern of gaps that defines a set of horizontal/vertical grid dots

lineColor

string

Sets the line color of gridlines

lineDashArray

string

Defines the pattern of dashes and gaps used to stroke horizontal grid lines

lineIntervals

number[]

A pattern of lines and gaps that defines a set of horizontal/vertical gridlines

snapIntervals

number[]

Specifies a set of intervals to snap the objects

<div id='diagram'></div>
let diagram: Diagram = new Diagram({
...
snapSettings: {
horizontalGridlines: { lineIntervals: [0.95, 9.05, 0.2, 9.75], snapIntervals: [10] },
verticalGridlines: { lineIntervals: [0.95, 9.05, 0.2, 9.75], snapIntervals: [10] }
},
...
});
diagram.appendTo('#diagram');