Class DecoratorPivot
Represents the position (X, Y) of the decorator to the source or target point of the connector.
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class DecoratorPivot : SfDiagramBase
Examples
<SfDiagram Height="600px" Connectors="@ConnectorCollection">
</SfDiagram>
@code
{
//Defines diagram's connector collection
public ObservableCollection<DiagramConnector> ConnectorCollection = new ObservableCollection<DiagramConnector>();
protected override void OnInitialized()
{
DiagramConnector DiagramConnector = new DiagramConnector()
{
SourcePoint = new ConnectorSourcePoint() { X = 100, Y = 100 },
TargetPoint = new ConnectorTargetPoint() { X = 200, Y = 200 },
TargetDecorator = new ConnectorTargetDecorator()
{
Shape = DecoratorShapes.Arrow,
Style = new DecoratorShapeStyle() { Fill = "#6f409f", StrokeColor = "#6f409f", StrokeWidth = 1 },
//set pivot value to target decorator
Pivot = new DecoratorPivot() { X = 0, Y = 0.5 },
},
Style = new ConnectorShapeStyle() { StrokeColor = "#6f409f", StrokeWidth = 1 },
//Specify the segments types as straight.
Type = Segments.Straight,
};
ConnectorCollection.Add(DiagramConnector);
}
}
Constructors
DecoratorPivot()
Represents the position (X, Y) of the decorator to the source or target point of the connector.
Declaration
public DecoratorPivot()
Properties
X
Gets or sets X coordinate position of the decorator. By default, it will be 0.
Declaration
public Nullable<double> X { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
Y
Gets or sets Y coordinate position of the decorator. By default, it will be 0.5.
Declaration
public Nullable<double> Y { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |