{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "diagram-shapes",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "Diagram",
  "variant": "shapes",
  "dependencies": [
    "Syncfusion.AspNetMvc.Diagram"
  ],
  "description": "Diagram gallery displays Basic, Flow, and BPMN shape collections for selection.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/diagram-shapes.md"
  },
  "files": [
    {
      "target": "src/components/diagram-shapes/Diagram.cshtml",
      "content": "@using Syncfusion.EJ2;\n@using Syncfusion.EJ2.DropDowns\n@section ControlsSection{\n    <div class=\"control-section\" style=\"padding:0px\">\n        @(Html.EJS().Diagram(\"container\").Width(\"100%\").Height(\"700px\").Created(\"nodesCreated\").SnapSettings(s => s.Constraints(Syncfusion.EJ2.Diagrams.SnapConstraints.None)).Render())\n    </div>\n  \n    <script>\n\n        var basicShapeModel = [\n            {\n                shape: { type: 'Text', content: 'Basic Shapes' },\n                constraints: ej.diagrams.NodeConstraints.PointerEvents,\n                style: { fontSize: 16, fill: 'None', fontFamily: 'sans-serif', bold: true, strokeWidth: 0 },\n            },\n        {\n            shape: { type: 'Basic', shape: 'Rectangle' }, annotations: [\n                { content: 'Rectangle' }\n            ]\n        },\n            {\n                shape: { type: 'Basic', shape: 'Ellipse' }, annotations: [\n                    { content: 'Ellipse' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Triangle' }, annotations: [\n                    { content: 'Triangle' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Plus' }, annotations: [\n                    { content: 'Plus' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Star' }, annotations: [\n                    { content: 'Star' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Pentagon' }, annotations: [\n                    { content: 'Pentagon' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Heptagon' }, annotations: [\n                    { content: 'Heptagon' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Octagon' }, annotations: [\n                    { content: 'Octagon' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Trapezoid' }, annotations: [\n                    { content: 'Trapezoid' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Decagon' }, annotations: [\n                    { content: 'Decagon' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'RightTriangle' }, annotations: [\n                    { content: 'Right Triangle' }\n                ]\n            },\n            {\n                shape: { type: 'Basic', shape: 'Parallelogram' }, annotations: [\n                    { content: 'Parallelogram' }\n                ]\n            },\n        ];\n        var flowShapeModel = [\n            {\n                shape: { type: 'Text', content: 'Flow Shapes' },\n                constraints: ej.diagrams.NodeConstraints.PointerEvents,\n                style: { fontSize: 16, fill: 'None', fontFamily: 'sans-serif', bold: true, strokeWidth: 0 },\n            },\n        {\n            shape: { type: 'Flow', shape: 'Terminator' }, annotations: [\n                { content: 'Terminator' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Process' }, annotations: [\n                { content: 'Process' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Decision' }, annotations: [\n                { content: 'Decision' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Document' }, annotations: [\n                { content: 'Document' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'PreDefinedProcess' }, annotations: [\n                { content: 'Predefined Process' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'PaperTap' }, annotations: [\n                { content: 'Paper Tape' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'DirectData' }, annotations: [\n                { content: 'Direct Data' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'SequentialData' }, annotations: [\n                { content: 'Direct Data' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Sort' }, annotations: [\n                { content: 'Sort' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'MultiDocument' }, annotations: [\n                { content: 'Multi-Document' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Collate' }, annotations: [\n                { content: 'Collate' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'SummingJunction' }, annotations: [\n                { content: 'Summing Junction' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Or' }, annotations: [\n                { content: 'Or' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'InternalStorage' }, annotations: [\n                { content: 'Internal Storage' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Extract' }, annotations: [\n                { content: 'Extract' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'ManualOperation' }, annotations: [\n                { content: 'Manual Operation' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Merge' }, annotations: [\n                { content: 'Merge' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'OffPageReference' }, annotations: [\n                { content: 'Off-Page Reference' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'SequentialAccessStorage' }, annotations: [\n                { content: 'Sequential Access Storage' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Data' }, annotations: [\n                { content: 'Data' }\n            ]\n        },\n        {\n            shape: { type: 'Flow', shape: 'Card' }, annotations: [\n                { content: 'Card' }\n            ]\n        },\n        ];\n\n        var bpmnShapeModel = [\n            {\n                shape: { type: 'Text', content: 'BPMN Shapes' },\n                constraints: ej.diagrams.NodeConstraints.PointerEvents,\n                style: { fontSize: 16, fill: 'none', fontFamily: 'sans-serif', bold: true, strokeWidth: 0 },\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Event', event: { event: 'Start', trigger: 'None' } },\n                annotations: [\n                    { content: 'Start Event' }\n                ]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Event', event: { event: 'Intermediate', trigger: 'None' } },\n                annotations: [\n                    { content: 'Intermediate Event' }\n                ]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Event', event: { event: 'End', trigger: 'None' } },\n                annotations: [\n                    { content: 'End Event' }\n                ]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Gateway' },\n                annotations: [\n                    { content: 'Gateway' }\n                ]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Activity', activity: { activity: 'Task' } },\n                annotations: [\n                    { content: 'Task' }\n                ]\n            },\n            {\n                shape: {\n                    type: 'Bpmn', shape: 'Activity', activity: {\n                        activity: 'SubProcess',\n                        subProcess: {\n                            type: 'Transaction', transaction: {\n                                success: { visible: false }, failure: { visible: false }, cancel: { visible: false }\n                            }\n                        }\n                    },\n                },\n                annotations: [\n                    { content: 'Transaction' }\n                ]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Message' }, annotations: [{ content: 'Message' }]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'DataObject' }, annotations: [{ content: 'Data Object' }]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'DataSource' }, annotations: [{ content: 'Data Source' }]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'Group' }, annotations: [{ content: 'Group' }]\n            },\n            {\n                shape: { type: 'Bpmn', shape: 'TextAnnotation' }, annotations: [{ content: 'Text Annotation' }]\n            }\n        ];\n\n        function nodesCreated(obj, diagram) {\n            var nodes = getNodes();\n            var diagram = document.getElementById(\"container\").ej2_instances[0];\n            for (var i = 0; i < nodes.length; i++) {\n                diagram.add(nodes[i]);\n            }\n            //diagram.fitToPage({ mode: 'Width' });\n            //diagram.dataBind();\n        }\n\n\n        function getNodes() {\n            var nodes1 = basicShapeModel;\n            nodes1 = nodes1.concat(this.flowShapeModel).concat(this.bpmnShapeModel);\n            var offsetx = 60;\n            var offsety = 50;\n            var count = 1;\n            for (var i = 0; i < nodes1.length; i++) {\n                var node = nodes1[i];\n                node.width = 40;\n                node.height = 40;\n                if (node.shape.type === 'Flow') {\n                    var shapeType = (node.shape).shape;\n                    if (shapeType === 'Process' || shapeType === 'Terminator') {\n                        node.height = 20;\n                    } else if (shapeType === 'Decision') {\n                        node.height = 35;\n                    } else if (shapeType === 'Document' || shapeType === 'DirectData' ||\n                        shapeType === 'MultiDocument' || shapeType === 'PreDefinedProcess') {\n                        node.height = 30;\n                    }\n\n                }\n                node.offsetX = offsetx;\n                node.offsetY = offsety;\n                if (!(node.shape.type === \"Text\")) {\n                    node.annotations[0].verticalAlignment = 'Top';\n                    node.annotations[0].offset = { y: 1 };\n                    node.annotations[0].margin = { top: 10 };\n\n                    offsetx = offsetx + 90;\n                    if (count % 10 === 0) {\n                        offsety = offsety + 100;\n                        offsetx = 60;\n                    }\n                    count++;\n                }\n                if (node.shape.type === 'Text') {\n                    offsetx = 60;\n                    offsety = offsety + 50;\n                    count = 1;\n                    node.width = 150;\n                    node.height = 100;\n                    node.offsetX = 90;\n                    if (!(node.shape.content === 'Basic Shapes')) {\n                        node.offsetX = 90;\n                        node.offsetY = offsety + 50;\n                        offsety = offsety + 100;\n                    }\n                }\n            }\n            return nodes1;\n        }\n\n    </script>\n}"
    },
    {
      "target": "src/components/diagram-shapes/DiagramController.cs",
      "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing Syncfusion.EJ2.Diagrams;\n\nnamespace EJ2MVCSampleBrowser.Controllers.Diagram\n{\n    public partial class DiagramController : Controller\n    {\n        // GET: Shapes\n        public ActionResult Shapes()\n        {  \n            return View(\"~/Views/Home/diagram/shapes/Diagram.cshtml\");\n        }\n    }\n\n}"
    }
  ]
}