Exemplo n.º 1
0
        private static void SimpleGraphWithLabels()
        {
            var digraph = new DiGraph();

            digraph.AddStatement(new NodeStatement("Node1")
                                 .WithAttribute(new LabelAttribute("Node 1")));
            digraph.AddStatement(new NodeStatement("Node2")
                                 .WithAttribute(new LabelAttribute(new HtmlLabel(new HtmlLabelText()
                                                                                 .WithTextItem(new HtmlLabelTextItem("Zeile 1")).WithTextItem(new HtmlLabelBrTextItem())
                                                                                 .WithTextItem(new HtmlLabelFontTextItem("Zeile 2", Color.Red, 18))))));
            digraph.AddStatement(new EdgeStatement("Node1", "Node2"));
            digraph.Save("simpleDiGraphWithLabel.gv");
        }
Exemplo n.º 2
0
        private static void SimpleGraph()
        {
            var graph = new Graph();

            graph.AddStatement(new NodeStatement("Node1"));
            graph.AddStatement(new NodeStatement("Node2"));
            graph.AddStatement(new EdgeStatement("Node1", "Node2"));
            graph.Save("simpleGraph1.gv");

            var digraph = new DiGraph();

            digraph.AddStatement(new NodeStatement("Node1"));
            digraph.AddStatement(new NodeStatement("Node2"));
            digraph.AddStatement(new EdgeStatement("Node1", "Node2"));
            digraph.Save("simpleDiGraph1.gv");
        }