none
How to set graph drawing area for MDS Layout graph RRS feed

  • Question

  • Hi,

    Am using MDS LayoutAlgorithm settings, Can u pls provide a solution to set the Drawing area for graph..

    How to set ScaleX and ScaleY values in Code??

    Aspect ratio is not working in MDS Layout...
    Wednesday, January 27, 2010 6:54 AM

Answers

  • Akila,

    Of course you can set ScaleX and ScaleY this way. What I meant that there is not guarantee that these values would be good for you drawing. You might still need to adjust them to see some interesting graph clusters especially for large graphs.

    Thanks,

    Lev


    Lev Nachmanson
    Thursday, January 28, 2010 6:30 AM

All replies

  •  Hi Akila,
    I don't know how to set in advance ScaleX and ScaleY, sorry.
    And you are right - aspect ratio does not work for MDS layouts.
    Thanks,
    Lev
    Lev Nachmanson
    Thursday, January 28, 2010 12:36 AM
  • Hi Lev,

    Thanks for your reply...

    The below code may helps to set ScaleX and ScaleY value in MDS LayoutSettings.

     Microsoft.Msagl.Mds.MdsLayoutSettings obj = new Microsoft.Msagl.Mds.MdsLayoutSettings();
     obj.ScaleY = 150;
     obj.ScaleX = 200;
     graph.LayoutAlgorithmSettings = obj;


    Thanks,
    Akila
    Thursday, January 28, 2010 4:56 AM
  • Akila,

    Of course you can set ScaleX and ScaleY this way. What I meant that there is not guarantee that these values would be good for you drawing. You might still need to adjust them to see some interesting graph clusters especially for large graphs.

    Thanks,

    Lev


    Lev Nachmanson
    Thursday, January 28, 2010 6:30 AM