Property to set even grid spacing

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?


1 Reply

SG Shyam G Syncfusion Team 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],

            }

        };

 

$("#diagram").ejDiagram({

            snapSettings: snapSettings,

        });

Please let me know if any concerns.

Regards,

Shyam G


Attachment: WebApplication9johnrobert_(5)_7a202fab.zip

Loader.
Up arrow icon