Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AssistantsDetails - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class AssistantsDetails

    Represents the details of the assistants in an organizational chart.

    Inheritance
    System.Object
    AssistantsDetails
    Implements
    System.IEquatable<AssistantsDetails>
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class AssistantsDetails : Object, IEquatable<AssistantsDetails>
    Examples
      
    @using Syncfusion.Blazor.Diagrams
    <SfDiagram Height="600px" NodeDefaults="@NodeDefaults" ConnectorDefaults="@ConnectorDefaults" Layout="@LayoutValue">
       <DiagramDataSource Id = "Id" ParentId= "Team" DataSource= "@DataSource" DataMapSettings= "@DataMap" ></ DiagramDataSource >
    </ SfDiagram >
    @code {
      //Initializing layout
      DiagramLayout LayoutValue;
      protected override void OnInitialized()
      {
      LayoutValue = new DiagramLayout()
        {
         //Sets layout type as OrganizationalChart...
         Type = LayoutType.OrganizationalChart,
         VerticalSpacing = 50,
         HorizontalSpacing = 40,
         //Initialize the layout info for the org chart layout
         LayoutInfo = new TreeInfo
         {
           Orientation = SubTreeOrientation.Vertical,
           Offset = -20,
           CanEnableSubTree = true,
           //provides an assitant details for the root node
           GetAssistantDetails = new AssistantsDetails()
           {
             Root = "General Manager",
             Assistants = new string[] { "Assistant Manager" }
            }
          }
        };
      }
      //Initializing DataMap Setting
      List<DiagramDataMapSetting> DataMap = new List<DiagramDataMapSetting>()
      {
        new DiagramDataMapSetting() { Property = "Annotations[0].Content, Field = "Role" },
       };
       //Initializing node defaults
       DiagramNode NodeDefaults = new DiagramNode()
       {
         Width = 150,
         Height = 50,
         Annotations = new ObservableCollection<DiagramNodeAnnotation>() { new DiagramNodeAnnotation() { Id = "label1", Style = new AnnotationStyle() { Color = "white" } }, },
         Style = new NodeShapeStyle { Fill = "darkcyan", StrokeColor = "white", }
        };
        //Initializing connector defaults
        DiagramConnector ConnectorDefaults = new DiagramConnector()
        {
          Type = Syncfusion.Blazor.Diagrams.Segments.Orthogonal,
          Style = new ConnectorShapeStyle() { StrokeColor = "#6BA5D7", StrokeWidth = 2 },
          TargetDecorator = new ConnectorTargetDecorator()
          {
            Shape = DecoratorShapes.None,
            Style = new DecoratorShapeStyle() { Fill = "#6BA5D7", StrokeColor = "#6BA5D7", },
           }
         };
        public class OrgChartDataModel
        {
          public string Id { get; set; }
          public string Team { get; set; }
          public string Role { get; set; }
         }
         public object DataSource = new List<object>()
         {
             new OrgChartDataModel() { Id= "1", Role= "General Manager" },
             new OrgChartDataModel() { Id= "2", Role= "Assistant Manager", Team= "1" },
             new OrgChartDataModel() { Id= "3", Role= "Human Resource Manager", Team= "1" },
             new OrgChartDataModel() { Id= "4", Role= "Design Manager", Team= "1" },
             new OrgChartDataModel() { Id= "5", Role= "Operation Manager", Team= "1" },
             new OrgChartDataModel() { Id= "6", Role= "Marketing Manager", Team= "1" }
          };
      }

    Constructors

    AssistantsDetails()

    Declaration
    public AssistantsDetails()

    Properties

    Assistants

    Specifies the details of the child item that have a different relationship with the parent node in an Organizational chart.

    Declaration
    public string[] Assistants { get; set; }
    Property Value
    Type Description
    System.String[]

    Root

    Returns the parent node for assistants.

    Declaration
    public string Root { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    Equals(AssistantsDetails)

    Indicates whether the AssistantsDetails object is equal to another object of the same type

    Declaration
    public bool Equals(AssistantsDetails assistantsDetails)
    Parameters
    Type Name Description
    AssistantsDetails assistantsDetails

    Represents the details of the assistants in an organizational chart.

    Returns
    Type Description
    System.Boolean

    Returns the assistant details for the layout

    Implements

    System.IEquatable<>
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved