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.
Unfortunately, activation email could not send to your email. Please try again.

Property to set even grid spacing

Thread ID:

Created:

Updated:

Platform:

Replies:

117161 Aug 26,2014 01:12 PM Aug 27,2014 02:05 AM JavaScript 1
loading
Tags: ejDiagram
Jeff
Asked On August 26, 2014 01:12 PM

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 02:05 AM

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

CONFIRMATION

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.

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.

;