Class DiagramsGradientStop
Represents the color and a position, where the previous color transition ends, and a new color transition starts.
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class DiagramsGradientStop : SfDiagramBase
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
</SfDiagram>
@code{
public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
protected override void OnInitialized()
{
DiagramNode Node = new DiagramNode()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new NodeShapeStyle()
{
Gradient = new DiagramGradient()
{
//Center point of inner circle
Fx = 20,
Fy = 20,
//Center point of outer circle
Cx = 50,
Cy = 50,
//Radius of a radial gradient
R = 50,
//Sets an array of stop objects
Stops = new ObservableCollection<DiagramsGradientStop>()
{
new DiagramsGradientStop(){ Color = "white", Offset = 0},
new DiagramsGradientStop(){ Color = "#6BA5D7", Offset = 100}
},
Type = GradientType.Radial
}
},
};
// Add node
NodeCollection.Add(Node);
}
}
Constructors
DiagramsGradientStop()
Represents the color and a position, where the previous color transition ends, and a new color transition starts.
Declaration
public DiagramsGradientStop()
Properties
Color
Gets or sets the color to be filled over the specified region.
Declaration
public string Color { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Offset
Gets or sets the position where the previous color transition ends, and a new color transition starts.
Declaration
public Nullable<double> Offset { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
Opacity
Gets or sets the transparency level of the region.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double |