We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom shapes in diagram control

Thread ID:





148624 Oct 28,2019 12:55 PM UTC Oct 29,2019 11:55 AM UTC Blazor 1
Tags: Diagram
Wolfgang Steinert
Asked On October 28, 2019 12:55 PM UTC

Hi there,

I am trying out the diagram control in Blazor and wanted to ask whether it is possible to customize the complete appearance of a diagram node, and if it is possible: how? :)

For example, imagine I wanted a node to look like this: https://ibb.co/hLSBPvB

Is it possible to achieve this?

Thank you,

Shyam G [Syncfusion]
Replied On October 29, 2019 11:55 AM UTC

Hi Wolfgang, 
Yes, you can use our group node to customize the appearance of a diagram node similar to your shared link. We have created a sample in which we have rendered a group node similar to your shared link. Please refer to a code example and sample below. 
Code example: 
@*create diagram*@ 
<EjsDiagram Width="100%" Height="800px"> 
   @*create nodes collection*@ 
            @*create node*@ 
            <DiagramNode Id="nodeA" Height="100" Width="400" OffsetX="500" OffsetY="300"> 
                @*set node style*@ 
                <NodeShapeStyle StrokeWidth="5"></NodeShapeStyle> 
                @*create node annotations*@ 
                    @*set annotation content*@ 
                    <DiagramNodeAnnotation Content="Cluster Node B"> 
                        @*change annotation style*@ 
                        <NodeAnnotationStyle Bold="true"></NodeAnnotationStyle> 
                        @*change annotation offset*@ 
                        <NodeAnnotationOffset X="0.5" Y="0.5"></NodeAnnotationOffset> 
            <DiagramNode Id="nodeB" Height="100" Width="100" OffsetX="350" OffsetY="200"> 
                 . . . 
                  . . . 
            <DiagramNode Id="nodeC" Height="100" Width="300" OffsetX="550" OffsetY="200"> 
              . . .  
              . . . 
            @*create group node*@ 
            <DiagramNode Id="firstGroup" Children="@firstGroupChildren"> 
    @*set children for group node*@ 
    private string[] firstGroupChildren { get; set; } = new string[] { "nodeA", "nodeB", "nodeC" }; 
In blazor, we can render static diagram with basic interaction such as zooming and panning. We have planned to provide interaction support in the diagram for our volume 4, release which is scheduled to release by the month of December, 2019. 
Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon