We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Property to set even grid spacing

Thread ID:





117161 Aug 26,2014 05:12 PM UTC Aug 27,2014 06:05 AM UTC JavaScript 1
Tags: ejDiagram
Asked On August 26, 2014 05:12 PM UTC

I would like to set horizontal and vertical grid spacing at even intervals.  I found documentation on the linesInterval property, but that property appears to require me to provide an array of values, specifying where each line should be drawn. What I would like to do is simply specify the distance between lines, and have the control calculate where each line should be drawn.  This can be done easily in MVC Classic:


diagramView.Grid.HorizontalSpacing = 6;
diagramView.Grid.VerticalSpacing = 6;


Is there a property or method in the ejDiagram control which provides similar functionality?

Shyam G [Syncfusion]
Replied On August 27, 2014 06:05 AM UTC

Hi Jeff

We have created a simple sample in which we set the horizontal and vertical grid spacing. Please see the below code snippet.

var snapSettings = {

            horizontalGridLines: {

                linesInterval: [1.25, 14, 0.25, 15, 0.25, 15, 0.25, 15, 0.25, 15],


            verticalGridLines: {

                linesInterval: [1.25, 14, 0.25, 15, 0.25, 15, 0.25, 15, 0.25, 15],





            snapSettings: snapSettings,


Please let me know if any concerns.


Shyam G

Attachment: WebApplication9johnrobert_(5)_7a202fab.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon