How to change diagram gridlines as dotted lines in Angular Diagram?
Gridlines are a pattern of lines drawn behind the Angular Diagram elements, providing visual guidance while dragging or arranging objects on the diagram surface. The snapSettings property is used to customize the gridlines and control the snapping behavior in the diagram. By specifying the gridType as “Dots”, you can render the diagram gridlines as dots.
The horizontalGridLines and the verticalGridLines properties allow to customize the appearance of the horizontal and vertical gridlines respectively. The lineColor and lineDashArray properties are used to customizes the line color and line style of the gridlines. The dotIntervals property specifies the interval between the gridlines.With help of the below code snippet, you can change the grid lines as dotted lines.
app.component.html
<ejs-diagram
#diagram
id="diagram"
width="100%"
height="700px"
[snapSettings]="snapSettings"
>
</ejs-diagram>
app.component.ts
public snapSettings: SnapSettingsModel = {
horizontalGridlines: { lineColor: 'black',
dotIntervals: [1.5, 20, 1.5, 20, 1.5, 20, 1.5, 20, 1.5, 20]},
verticalGridlines: { dotIntervals: [1.5, 20, 1.5, 20, 1.5, 20] },
gridType: 'Dots'
};
Conclusion
I hope you enjoyed learning about how to change diagram gridlines as dotted lines in Angular Diagram.
You can refer to our Angular Diagram feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Diagram example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!