Syncfusions basic shapes show up as invisible in SfDiagram

Hello, I'm not sure if this is a bug or if I'm doing something wrong.

Basically I am creating nodes from a data source, and depending on certain properties I would like for the nodes to have different shapes.

Here's the snippet of code I'm focusing on:

if (bool)
{
     Node.UnitWidth = 150;
     Node.UnitHeight = 50;
     Node.Shape = Resources["Ellipse"];
     Node.ShapeStyle = Resources["ShapeStyle"] as Style;
}

if I change "Resources["Ellipse"];" to "new EllipseGeometry(new Rect(new Size(150, 50)));" then it appears correctly, otherwise it is invisible,
I would like to use other basic shapes other than Ellipse, so for them I don't really have a work around, any help is appreciated, thanks.

3 Replies 1 reply marked as answer

RT Ramya Thirugnanam Syncfusion Team May 1, 2019 05:32 PM UTC

Hi Jerod, 
 
Thanks for contacting Syncfusion support. 
 
Please set the “Stretch” as “Fill” for ShapeStyle as given below to show the Node with “Ellipse” Shape. 
 
 
 Code example: 
  <Style TargetType="Path" x:Key="ShapeStyle"> 
                <Setter Property="Fill" Value="DarkCyan"></Setter> 
                <Setter Property="Stroke" Value="Black"/> 
                <Setter Property="StrokeThickness" Value="2"></Setter> 
                <Setter Property="Stretch" Value="Fill"></Setter> 
            </Style> 
 
Regards, 
Ramya T 


Marked as answer

JB Jerod Burnett replied to Ramya Thirugnanam October 2, 2025 03:11 PM UTC

Thank you so much this was the answer!



PR Preethi Rajakandham Syncfusion Team October 7, 2025 04:30 AM UTC

Hi Jerod Burnett,

You are welcome. 

Please let us know if you require any further assistance on this. We will be happy to assist you.

Regards,

Preethi R






Loader.
Up arrow icon