none
How to draw the graph like a triangular network format rather shrinking RRS feed

  • Question

  • InitializeComponent();
                //create a viewer object
                Microsoft.Glee.GraphViewerGdi.GViewer viewer = new Microsoft.Glee.GraphViewerGdi.GViewer();
    
                //create a graph object
                Microsoft.Glee.Drawing.Graph graph = new Microsoft.Glee.Drawing.Graph("graph");
                
                string strNode1 = "1";
                string strNode2 = "2";
                string strNode3 = "3";
                string strNode4 = "4";
                string strNode5 = "5";
                string strNode6 = "6";
    
                graph.AddEdge(strNode1, strNode2);
                graph.AddEdge(strNode2, strNode3);
                graph.AddEdge(strNode1, strNode3);
    
                graph.AddEdge(strNode2, strNode4);
                graph.AddEdge(strNode3, strNode4);
    
                graph.AddEdge(strNode2, strNode5);
                graph.AddEdge(strNode4, strNode5);
    
                //bind the graph to the viewer
                viewer.Graph = graph;
    
                //associate the viewer with the form
                this.SuspendLayout();
                viewer.Dock = System.Windows.Forms.DockStyle.Fill;
                this.Controls.Add(viewer);
                this.ResumeLayout();
    
                //show the form
                this.ShowDialog();


    ---v-----!

    Friday, November 15, 2013 6:31 AM