Exemplo n.º 1
0
        // GET: DrawingTools
        public ActionResult DrawingTools()
        {
            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;
            return(View());
        }
Exemplo n.º 2
0
        public IActionResult Serialization()
        {
            List <DiagramNodeAnnotation> Node1 = new List <DiagramNodeAnnotation>();

            Node1.Add(new DiagramNodeAnnotation()
            {
                Content = "Start"
            });
            List <DiagramNodeAnnotation> Node2 = new List <DiagramNodeAnnotation>();

            Node2.Add(new DiagramNodeAnnotation()
            {
                Content = "Alarm Rings"
            });
            List <DiagramNodeAnnotation> Node3 = new List <DiagramNodeAnnotation>();

            Node3.Add(new DiagramNodeAnnotation()
            {
                Content = "Ready to Get Up"
            });
            List <DiagramNodeAnnotation> Node4 = new List <DiagramNodeAnnotation>();

            Node4.Add(new DiagramNodeAnnotation()
            {
                Content = "Climb Out of Bed"
            });
            List <DiagramNodeAnnotation> Node5 = new List <DiagramNodeAnnotation>();

            Node5.Add(new DiagramNodeAnnotation()
            {
                Content = "End"
            });
            List <DiagramNodeAnnotation> Node6 = new List <DiagramNodeAnnotation>();

            Node6.Add(new DiagramNodeAnnotation()
            {
                Content = "Relay"
            });
            List <DiagramNodeAnnotation> Node7 = new List <DiagramNodeAnnotation>();

            Node7.Add(new DiagramNodeAnnotation()
            {
                Content = "Hit Snooze Button", Margin = new DiagramMargin()
                {
                    Left = 10, Right = 10, Bottom = 10, Top = 10
                }
            });
            List <DiagramNode> Nodes = new List <DiagramNode>();

            List <DiagramConnectorAnnotation> Connector1 = new List <DiagramConnectorAnnotation>();

            Connector1.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            List <DiagramConnectorAnnotation> Connector2 = new List <DiagramConnectorAnnotation>();

            Connector2.Add(new DiagramConnectorAnnotation()
            {
                Content = "No", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            Nodes.Add(new DiagramNode()
            {
                Id      = "Start",
                OffsetX = 250,
                OffsetY = 60,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = Node1,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Alarm",
                OffsetX = 250,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = Node2,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Ready",
                OffsetX = 250,
                OffsetY = 260,
                Width   = 100,
                Height  = 80,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#c5efaf", StrokeColor = "#797979"
                },
                Annotations = Node3,
                Shape       = new { type = "Flow", shape = "Decision" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Climb",
                OffsetX = 250,
                OffsetY = 370,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = Node4,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "End",
                OffsetX = 250,
                OffsetY = 460,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = Node5,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Relay",
                OffsetX = 450,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#f8eee5", StrokeColor = "#797979"
                },
                Annotations = Node6,
                Shape       = new { type = "Flow", shape = "Delay" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Hit",
                OffsetX = 450,
                OffsetY = 260,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = Node7,
                Shape       = new { type = "Flow", shape = "Process" }
            });

            List <DiagramConnector> Connectors = new List <DiagramConnector>();

            Connectors.Add(new DiagramConnector()
            {
                Id = "connector1", SourceID = "Start", TargetID = "Alarm",
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector2", SourceID = "Alarm", TargetID = "Ready"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector3", SourceID = "Ready", TargetID = "Climb", Annotations = Connector1
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector4", SourceID = "Climb", TargetID = "End"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector5", SourceID = "Ready", TargetID = "Hit", Annotations = Connector2
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector6", SourceID = "Hit", TargetID = "Relay"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector7", SourceID = "Relay", TargetID = "Alarm"
            });
            ViewBag.nodes      = Nodes;
            ViewBag.connectors = Connectors;


            List <DiagramNode> SymbolPaletee = new List <DiagramNode>();

            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Sort", Shape = new { type = "Flow", shape = "Sort" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "MultiDocument", Shape = new { type = "Flow", shape = "MultiDocument" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Collate", Shape = new { type = "Flow", shape = "Collate" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SummingJunction", Shape = new { type = "Flow", shape = "SummingJunction" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Or", Shape = new { type = "Flow", shape = "Or" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "InternalStorage", Shape = new { type = "Flow", shape = "InternalStorage" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Extract", Shape = new { type = "Flow", shape = "Extract" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "ManualOperation", Shape = new { type = "Flow", shape = "ManualOperation" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Merge", Shape = new { type = "Flow", shape = "Merge" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "OffPageReference", Shape = new { type = "Flow", shape = "OffPageReference" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SequentialAccessStorage", Shape = new { type = "Flow", shape = "SequentialAccessStorage" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Annotation", Shape = new { type = "Flow", shape = "Annotation" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Annotation2", Shape = new { type = "Flow", shape = "Annotation2" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Data", Shape = new { type = "Flow", shape = "Data" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Card", Shape = new { type = "Flow", shape = "Card" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Delay", Shape = new { type = "Flow", shape = "Delay" }
            });


            List <DiagramConnector> SymbolPaletteConnectors = new List <DiagramConnector>();

            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link1",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link2",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link3",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link4",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link5",
                Type        = Segments.Bezier,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });

            List <SymbolPalettePalette> Palette = new List <SymbolPalettePalette>();

            Palette.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = SymbolPaletee, IconCss = "e-ddb-icons1 e-flow", Title = "Flow Shapes"
            });
            Palette.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = SymbolPaletteConnectors, IconCss = "e-ddb-icons1 e-connector", Title = "Connectors"
            });

            ViewBag.Palette = Palette;

            ViewBag.Spconnectors = SymbolPaletteConnectors;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Right = 15, Bottom = 15, Top = 15
            };

            ViewBag.margin        = margin;
            ViewBag.getSymbolInfo = "getSymbolInfo";
            return(View());
        }
        // GET: Serialization
        public ActionResult Serialization()
        {
            List <DiagramNode> nodes = new List <DiagramNode>();

            nodes.Add(new DiagramNode()
            {
                Id      = "Start",
                OffsetX = 150,
                OffsetY = 80,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Start"
                    }
                },
                Shape = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Alarm",
                OffsetX = 150,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Alarm Rings"
                    }
                },
                Shape = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Ready",
                OffsetX = 150,
                OffsetY = 240,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#c5efaf", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Ready to Get Up"
                    }
                },
                Shape = new { type = "Flow", shape = "Decision" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Climb",
                OffsetX = 150,
                OffsetY = 330,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Climb Out of Bed"
                    }
                },
                Shape = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "End",
                OffsetX = 150,
                OffsetY = 430,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "End"
                    }
                },
                Shape = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Relay",
                OffsetX = 350,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#f8eee5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Relay"
                    }
                },
                Shape = new { type = "Flow", shape = "Delay" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Hit",
                OffsetX = 350,
                OffsetY = 240,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Hit Snooze Button", Margin = new DiagramMargin()
                        {
                            Left = 10, Right = 10, Bottom = 10, Top = 10
                        }
                    }
                },
                Shape = new { type = "Flow", shape = "Process" }
            });

            List <DiagramConnector> connectors = new List <DiagramConnector>();

            connectors.Add(new DiagramConnector()
            {
                Id = "connector1", SourceID = "Start", TargetID = "Alarm"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector2", SourceID = "Alarm", TargetID = "Ready"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector3", SourceID = "Ready", TargetID = "Climb"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector4", SourceID = "Climb", TargetID = "End"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector5", SourceID = "Ready", TargetID = "Hit"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector6", SourceID = "Hit", TargetID = "Relay"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector7", SourceID = "Relay", TargetID = "Alarm"
            });

            ViewBag.nodes      = nodes;
            ViewBag.connectors = connectors;

            List <DiagramNode> flowShapes = new List <DiagramNode>();

            flowShapes.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Sort", Shape = new { type = "Flow", shape = "Sort" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "MultiDocument", Shape = new { type = "Flow", shape = "MultiDocument" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Collate", Shape = new { type = "Flow", shape = "Collate" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SummingJunction", Shape = new { type = "Flow", shape = "SummingJunction" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Or", Shape = new { type = "Flow", shape = "Or" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "InternalStorage", Shape = new { type = "Flow", shape = "InternalStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Extract", Shape = new { type = "Flow", shape = "Extract" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "ManualOperation", Shape = new { type = "Flow", shape = "ManualOperation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Merge", Shape = new { type = "Flow", shape = "Merge" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "OffPageReference", Shape = new { type = "Flow", shape = "OffPageReference" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialAccessStorage", Shape = new { type = "Flow", shape = "SequentialAccessStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation", Shape = new { type = "Flow", shape = "Annotation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation2", Shape = new { type = "Flow", shape = "Annotation2" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Data", Shape = new { type = "Flow", shape = "Data" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Card", Shape = new { type = "Flow", shape = "Card" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Delay", Shape = new { type = "Flow", shape = "Delay" }
            });


            List <DiagramConnector> paletteConnectors = new List <DiagramConnector>();

            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link1",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow, Style = new DiagramShapeStyle()
                    {
                        StrokeColor = "#757575", Fill = "#757575"
                    }
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link2",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link3",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow, Style = new DiagramShapeStyle()
                    {
                        StrokeColor = "#757575", Fill = "#757575"
                    }
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link4",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link5",
                Type        = Segments.Bezier,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });

            List <SymbolPalettePalette> palettes = new List <SymbolPalettePalette>();

            palettes.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = flowShapes, IconCss = "shapes", Title = "Flow Shapes"
            });
            palettes.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = paletteConnectors, IconCss = "shapes", Title = "Connectors"
            });

            ViewBag.Palette = palettes;

            ViewBag.Spconnectors = paletteConnectors;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Right = 15, Bottom = 15, Top = 15
            };

            ViewBag.margin = margin;

            return(View());
        }
        // GET= DefaultFunctionalities
        public ActionResult DefaultFunctionalities()
        {
            List <DiagramNode>           nodes = new List <DiagramNode>();
            List <DiagramNodeAnnotation> Node1 = new List <DiagramNodeAnnotation>();

            Node1.Add(new DiagramNodeAnnotation()
            {
                Content = "Place Order", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node2 = new List <DiagramNodeAnnotation>();

            Node2.Add(new DiagramNodeAnnotation()
            {
                Content = "Start Transaction", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node3 = new List <DiagramNodeAnnotation>();

            Node3.Add(new DiagramNodeAnnotation()
            {
                Content = "Verification", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node4 = new List <DiagramNodeAnnotation>();

            Node4.Add(new DiagramNodeAnnotation()
            {
                Content = "Credit Card ValId?", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node5 = new List <DiagramNodeAnnotation>();

            Node5.Add(new DiagramNodeAnnotation()
            {
                Content = "Funds Available", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node6 = new List <DiagramNodeAnnotation>();

            Node6.Add(new DiagramNodeAnnotation()
            {
                Content = "Enter Payment Method", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node7 = new List <DiagramNodeAnnotation>();

            Node7.Add(new DiagramNodeAnnotation()
            {
                Content = "Log Transaction", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node8 = new List <DiagramNodeAnnotation>();

            Node8.Add(new DiagramNodeAnnotation()
            {
                Content = "Reconcile the entries", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node9 = new List <DiagramNodeAnnotation>();

            Node9.Add(new DiagramNodeAnnotation()
            {
                Content = "Complete Transaction", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node10 = new List <DiagramNodeAnnotation>();

            Node10.Add(new DiagramNodeAnnotation()
            {
                Content = "Send E-mail", Margin = new DiagramMargin()
                {
                    Left = 25, Right = 25
                }, Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node11 = new List <DiagramNodeAnnotation>();

            Node11.Add(new DiagramNodeAnnotation()
            {
                Content = "Customer Database", Margin = new DiagramMargin()
                {
                    Left = 25, Right = 25
                }, Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramConnectorAnnotation> Connector1 = new List <DiagramConnectorAnnotation>();

            Connector1.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            List <DiagramConnectorAnnotation> Connector2 = new List <DiagramConnectorAnnotation>();

            Connector2.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            List <DiagramConnectorAnnotation> Connector3 = new List <DiagramConnectorAnnotation>();

            Connector3.Add(new DiagramConnectorAnnotation()
            {
                Content = "No", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            nodes.Add(new DiagramNode()
            {
                Id          = "NewIdea",
                OffsetY     = 80,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node1,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "Meeting",
                OffsetX     = 340,
                OffsetY     = 160,
                Height      = 60,
                Annotations = Node2,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "BoardDecision",
                OffsetX     = 340,
                OffsetY     = 240,
                Height      = 60,
                Annotations = Node3,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "Project",
                OffsetX     = 340,
                OffsetY     = 330,
                Height      = 60,
                Annotations = Node4,
                Shape       = new { type = "Flow", shape = "Decision" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "End",
                OffsetY     = 430,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node5,
                Shape       = new { type = "Flow", shape = "Decision" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "node11",
                OffsetY     = 330,
                OffsetX     = 550,
                Height      = 60,
                Annotations = Node6,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "transaction_entered",
                OffsetY     = 630,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node7,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "node12",
                OffsetY     = 630,
                OffsetX     = 550,
                Height      = 60,
                Annotations = Node8,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "transaction_completed",
                OffsetY     = 530,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node9,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "Data",
                OffsetY     = 530,
                OffsetX     = 120,
                Height      = 60,
                Annotations = Node10,
                Shape       = new { type = "Flow", shape = "Data" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "node10",
                OffsetY     = 530,
                OffsetX     = 550,
                Height      = 60,
                Annotations = Node11,
                Shape       = new { type = "Flow", shape = "DirectData" }
            });

            List <DiagramConnector> Connectors = new List <DiagramConnector>();

            Connectors.Add(new DiagramConnector()
            {
                Id = "connector1", SourceID = "NewIdea", TargetID = "Meeting",
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector2", SourceID = "Meeting", TargetID = "BoardDecision"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector3", SourceID = "BoardDecision", TargetID = "Project"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id          = "connector4",
                SourceID    = "Project",
                TargetID    = "End",
                Annotations = Connector1
            });
            Connectors.Add(new DiagramConnector()
            {
                Id          = "connector5",
                SourceID    = "End",
                TargetID    = "transaction_completed",
                Annotations = Connector2
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector6", SourceID = "transaction_completed", TargetID = "transaction_entered"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector7", SourceID = "transaction_completed", TargetID = "Data"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector8", SourceID = "transaction_completed", TargetID = "node10"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector9", SourceID = "node11", TargetID = "Meeting"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector10", SourceID = "End", TargetID = "node11"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id          = "connector11",
                SourceID    = "Project",
                TargetID    = "node11",
                Annotations = Connector3
            });
            Connectors.Add(new DiagramConnector()
            {
                Id       = "connector12",
                SourceID = "transaction_entered",
                TargetID = "node12",
                Style    = new DiagramStrokeStyle()
                {
                    StrokeDashArray = "2,2"
                }
            });
            ViewBag.nodes      = nodes;
            ViewBag.connectors = Connectors;

            List <Syncfusion.EJ2.Diagrams.DiagramNode> flowShapes = new List <Syncfusion.EJ2.Diagrams.DiagramNode>();

            flowShapes.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Sort", Shape = new { type = "Flow", shape = "Sort" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "MultiDocument", Shape = new { type = "Flow", shape = "MultiDocument" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Collate", Shape = new { type = "Flow", shape = "Collate" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SummingJunction", Shape = new { type = "Flow", shape = "SummingJunction" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Or", Shape = new { type = "Flow", shape = "Or" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "InternalStorage", Shape = new { type = "Flow", shape = "InternalStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Extract", Shape = new { type = "Flow", shape = "Extract" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "ManualOperation", Shape = new { type = "Flow", shape = "ManualOperation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Merge", Shape = new { type = "Flow", shape = "Merge" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "OffPageReference", Shape = new { type = "Flow", shape = "OffPageReference" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialAccessStorage", Shape = new { type = "Flow", shape = "SequentialAccessStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation", Shape = new { type = "Flow", shape = "Annotation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation2", Shape = new { type = "Flow", shape = "Annotation2" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Data", Shape = new { type = "Flow", shape = "Data" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Card", Shape = new { type = "Flow", shape = "Card" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Delay", Shape = new { type = "Flow", shape = "Delay" }
            });


            List <DiagramConnector> SymbolPaletteConnectors = new List <DiagramConnector>();

            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link1",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link2",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link3",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link4",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link5",
                Type        = Segments.Bezier,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });

            List <SymbolPalettePalette> Palette = new List <SymbolPalettePalette>();

            Palette.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = flowShapes, IconCss = "shapes", Title = "Flow Shapes"
            });
            Palette.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = SymbolPaletteConnectors, IconCss = "shapes", Title = "Connectors"
            });

            ViewBag.Palette = Palette;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Right = 15, Bottom = 15, Top = 15
            };

            ViewBag.margin = margin;

            return(View());
        }
Exemplo n.º 5
0
        public IActionResult PrintandExport()
        {
            List <DiagramNode>           Nodes = new List <DiagramNode>();
            List <DiagramNodeAnnotation> Node1 = new List <DiagramNodeAnnotation>();

            Node1.Add(new DiagramNodeAnnotation()
            {
                Content = "Source Document", Margin = new DiagramMargin()
                {
                    Left = 15, Right = 15, Bottom = 15, Top = 15
                }
            });
            List <DiagramNodeAnnotation> Node2 = new List <DiagramNodeAnnotation>();

            Node2.Add(new DiagramNodeAnnotation()
            {
                Content = "Census Record", Margin = new DiagramMargin()
                {
                    Left = 15, Right = 15, Bottom = 15, Top = 15
                }
            });
            List <DiagramNodeAnnotation> Node3 = new List <DiagramNodeAnnotation>();

            Node3.Add(new DiagramNodeAnnotation()
            {
                Content = "Books and Magazine"
            });
            List <DiagramNodeAnnotation> Node4 = new List <DiagramNodeAnnotation>();

            Node4.Add(new DiagramNodeAnnotation()
            {
                Content = "Record Template"
            });
            List <DiagramNodeAnnotation> Node5 = new List <DiagramNodeAnnotation>();

            Node5.Add(new DiagramNodeAnnotation()
            {
                Content = "Traditional Template"
            });
            List <DiagramNodeAnnotation> Node6 = new List <DiagramNodeAnnotation>();

            Node6.Add(new DiagramNodeAnnotation()
            {
                Content = "Non Traditional"
            });
            List <DiagramNodeAnnotation> Node7 = new List <DiagramNodeAnnotation>();

            Node7.Add(new DiagramNodeAnnotation()
            {
                Content = "Health Fitness"
            });
            List <DiagramNodeAnnotation> Node8 = new List <DiagramNodeAnnotation>();

            Node8.Add(new DiagramNodeAnnotation()
            {
                Content = "Diet"
            });
            List <DiagramNodeAnnotation> Node9 = new List <DiagramNodeAnnotation>();

            Node9.Add(new DiagramNodeAnnotation()
            {
                Content = "Flexibility"
            });
            List <DiagramNodeAnnotation> Node10 = new List <DiagramNodeAnnotation>();

            Node10.Add(new DiagramNodeAnnotation()
            {
                Content = "Muscular Endurance"
            });
            List <DiagramNodeAnnotation> Node11 = new List <DiagramNodeAnnotation>();

            Node11.Add(new DiagramNodeAnnotation()
            {
                Content = "Cardiovascular Strength"
            });
            List <DiagramNodeAnnotation> Node12 = new List <DiagramNodeAnnotation>();

            Node12.Add(new DiagramNodeAnnotation()
            {
                Content = "Muscular Strength"
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "sourceNode1",
                OffsetX = 120,
                OffsetY = 100,
                Width   = 100,
                Height  = 50,

                Annotations = Node1,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#868686", Fill = "#d5f5d5"
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "censusNode2",
                OffsetX = 120,
                OffsetY = 200,
                Width   = 100,
                Height  = 75,

                Annotations = Node2,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#8f908f", Fill = "#e2f3fa"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Diamond
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "booksNode3",
                OffsetX     = 120,
                OffsetY     = 325,
                Width       = 100,
                Height      = 75,
                MaxWidth    = 100,
                MaxHeight   = 75,
                Annotations = Node3,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#8f908f", Fill = "#e2f3fa"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Diamond
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "recordNode4",
                OffsetX     = 320,
                OffsetY     = 200,
                Width       = 125,
                Height      = 50,
                Annotations = Node4,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#868686", Fill = "#d5f5d5"
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "traditionalNode5",
                OffsetX     = 320,
                OffsetY     = 325,
                Width       = 125,
                Height      = 50,
                Annotations = Node5,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#868686", Fill = "#d5f5d5"
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "nontraditionalNode6",
                OffsetX     = 120,
                OffsetY     = 425,
                Width       = 135,
                Height      = 50,
                Annotations = Node6,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#faebee"
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "Radial1",
                OffsetX     = 850,
                OffsetY     = 225,
                Width       = 100,
                Height      = 75,
                Annotations = Node7,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#fef0db"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "Radial3",
                OffsetX     = 1025,
                OffsetY     = 175,
                Width       = 100,
                Height      = 75,
                Annotations = Node9,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#faebee"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "Radial4",
                OffsetX     = 1000,
                OffsetY     = 350,
                Width       = 100,
                Height      = 75,
                Annotations = Node10,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#faebee"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "Radial5",
                OffsetX     = 675,
                OffsetY     = 175,
                Width       = 100,
                Height      = 75,
                Annotations = Node11,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#faebee"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "Radial6",
                OffsetX     = 770,
                OffsetY     = 350,
                Width       = 100,
                Height      = 75,
                Annotations = Node12,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#faebee"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });
            Nodes.Add(new DiagramNode()
            {
                Id          = "Radial2",
                OffsetX     = 850,
                OffsetY     = 100,
                Width       = 100,
                Height      = 75,
                Annotations = Node8,
                Style       = new DiagramShapeStyle()
                {
                    StrokeColor = "#a8a8a8", Fill = "#faebee"
                },
                Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });

            List <DiagramConnectorAnnotation> flowconnector2 = new List <DiagramConnectorAnnotation>();

            flowconnector2.Add(new DiagramConnectorAnnotation()
            {
                Content = "No"
            });
            List <DiagramConnectorAnnotation> flowconnector3 = new List <DiagramConnectorAnnotation>();

            flowconnector3.Add(new DiagramConnectorAnnotation()
            {
                Content = "No"
            });
            List <DiagramConnectorAnnotation> flowconnector4 = new List <DiagramConnectorAnnotation>();

            flowconnector4.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });
            List <DiagramConnectorAnnotation> flowconnector5 = new List <DiagramConnectorAnnotation>();

            flowconnector5.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });

            List <DiagramConnectorAnnotation> radialConnector1 = new List <DiagramConnectorAnnotation>();

            radialConnector1.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });
            List <DiagramConnectorAnnotation> radialConnector2 = new List <DiagramConnectorAnnotation>();

            radialConnector2.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });
            List <DiagramConnectorAnnotation> radialConnector3 = new List <DiagramConnectorAnnotation>();

            radialConnector3.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });
            List <DiagramConnectorAnnotation> radialConnector4 = new List <DiagramConnectorAnnotation>();

            radialConnector4.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });
            List <DiagramConnectorAnnotation> radialConnector5 = new List <DiagramConnectorAnnotation>();

            radialConnector5.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes"
            });

            List <DiagramConnector> Connectors = new List <DiagramConnector>();

            Connectors.Add(new DiagramConnector()
            {
                Id = "flowChartConnector1", SourceID = "sourceNode1", TargetID = "censusNode2"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "flowChartConnector2", SourceID = "censusNode2", TargetID = "booksNode3", Annotations = flowconnector2
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "flowChartConnector3", SourceID = "booksNode3", TargetID = "nontraditionalNode6", Annotations = flowconnector3
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "flowChartConnector4", SourceID = "censusNode2", TargetID = "recordNode4", Annotations = flowconnector4
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "flowChartConnector5", SourceID = "booksNode3", TargetID = "traditionalNode5", Annotations = flowconnector5
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "RadialConnector1", SourceID = "Radial1", TargetID = "Radial2", Annotations = radialConnector1
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "RadialConnector2", SourceID = "Radial1", TargetID = "Radial3", Annotations = radialConnector2
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "RadialConnector3", SourceID = "Radial1", TargetID = "Radial4", Annotations = radialConnector3
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "RadialConnector4", SourceID = "Radial1", TargetID = "Radial5", Annotations = radialConnector4
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "RadialConnector5", SourceID = "Radial1", TargetID = "Radial6", Annotations = radialConnector5
            });
            ViewBag.nodes      = Nodes;
            ViewBag.connectors = Connectors;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;
            return(View());
        }