# ASP.NET Core Diagram Overview

The Telerik UI Diagram TagHelper and HtmlHelper for ASP.NET Core are server-side wrappers for the Kendo UI Diagram widget.

The Diagram represents information in a schematic way and according to particular visualization techniques.

* [Demo page for the Diagram](https://demos.telerik.com/aspnet-core/diagram)

## Basic Configuration

1. Return the data as JSON.

   ```
    public ActionResult _OrgChart()
    {
        return Json(DiagramDataRepository.OrgChart(), JsonRequestBehavior.AllowGet);
    }
   ```

2. In the view, configure the Diagram to use the action method that was created in the previous step.

   ```Razor HtmlHelper
       @(Html.Kendo().Diagram()
           .Name("diagram")
           .DataSource(dataSource => dataSource
               .Read(read => read
                   .Action("_OrgChart", "Diagram") // Specify the action method and controller names.
               )
               .Model(m => m.Children("Items"))
           )
           .Layout(l => l.Type(DiagramLayoutType.Layered))
       )
   ```

   ```Razor TagHelper
       <kendo-diagram name="diagram">
           <hierarchical-datasource server-operation="false">
               <transport>
                   <read url="@Url.Action("_OrgChart", "Diagram")" />
               </transport>
               <schema>
                   <hierarchical-model children="Items"></hierarchical-model>
               </schema>
           </hierarchical-datasource>
           <editable enabled="false" />
           <layout type="DiagramLayoutType.Layered"></layout>
       </kendo-diagram>
   ```

## Functionality and Features

* [Data binding](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/binding)—Set the binding method for the Diagram.
* [Editing](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/editing)—You can enable editing operations for both the existing shapes and the connections between them.
* [Layout](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/layout)—The Diagram comes with built-in layout options that enable you to further alter its appearance.
* [Shapes](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/shapes)—The Diagram enables you to add various shapes.
* [Tooltips](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/tooltips)—Display additional information when users hover over shapes and connections.
* [Keyboard navigation](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/accessibility/keyboard-navigation)—Navigate and interact with the Diagram using keyboard shortcuts.
* [PDF export](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/export/pdf-export)—You have the ability to export the existing Diagram to a PDF document.
* [Advanced export](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/export/advanced-export)—The Diagram enables you to further customize the exporting mechanism.

## Next Steps

* [Getting Started with the Diagram](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/getting-started)

* [Basic Usage of the Diagram HtmlHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/diagram/index)

* [Diagram in Razor Pages](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/diagrams-and-maps/diagram/razor-pages)

## See Also

* [Using the API of the Diagram for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/diagram/api)
* [Knowledge Base Section](https://www.telerik.com/aspnet-core-ui/documentation/knowledge-base)
