Class RadialGradient
Defines a smooth transition between stops on a circle.
Inherited Members
Namespace: Syncfusion.JavaScript.DataVisualization.Models.Diagram
Assembly: Syncfusion.EJ.dll
Syntax
public class RadialGradient : Gradient
Constructors
RadialGradient()
Initializes a new instance of the RadialGradient class.
Declaration
public RadialGradient()
RadialGradient(RadialGradient)
Initializes a new instance of the LinearGradient class.
Declaration
public RadialGradient(RadialGradient src)
Parameters
Type | Name | Description |
---|---|---|
RadialGradient | src | Object to copy. |
Properties
CX
Gets or sets the position of the outermost circle
Declaration
[JsonProperty("cx")]
public double CX { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node = new Node();
Node.Name = "node";
Node.Width = 100;
Node.Height = 100;
Collection Stops = new Collection();
Stops.Add(new Stop() { Color = "white", Offset = 0 });
Stops.Add(new Stop() { Color = "red", Offset = 50 });
Node.Gradient = new RadialGradient() { CX = 0, CY = 50, FX = 0, FY = 50, Stops = Stops };
Model.Nodes.Add(Node);
ViewData["diagramModel"] = Model;
CY
Gets or sets outer most circle of the radial gradient
Declaration
[JsonProperty("cy")]
public double CY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node = new Node();
Node.Name = "node";
Node.Width = 100;
Node.Height = 100;
Collection Stops = new Collection();
Stops.Add(new Stop() { Color = "white", Offset = 0 });
Stops.Add(new Stop() { Color = "red", Offset = 50 });
Node.Gradient = new RadialGradient() { CX = 0, CY = 50, FX = 0, FY = 50, Stops = Stops };
Model.Nodes.Add(Node);
ViewData["diagramModel"] = Model;
FX
Gets or sets the innermost circle of the radial gradient
Declaration
[JsonProperty("fx")]
public double FX { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node = new Node();
Node.Name = "node";
Node.Width = 100;
Node.Height = 100;
Collection Stops = new Collection();
Stops.Add(new Stop() { Color = "white", Offset = 0 });
Stops.Add(new Stop() { Color = "red", Offset = 50 });
Node.Gradient = new RadialGradient() { CX = 0, CY = 50, FX = 0, FY = 50, Stops = Stops };
Model.Nodes.Add(Node);
ViewData["diagramModel"] = Model;
FY
Gets or sets innermost circle of the radial gradient
Declaration
[JsonProperty("fy")]
public double FY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node = new Node();
Node.Name = "node";
Node.Width = 100;
Node.Height = 100;
Collection Stops = new Collection();
Stops.Add(new Stop() { Color = "white", Offset = 0 });
Stops.Add(new Stop() { Color = "red", Offset = 50 });
Node.Gradient = new RadialGradient() { CX = 0, CY = 50, FX = 0, FY = 50, Stops = Stops };
Model.Nodes.Add(Node);
ViewData["diagramModel"] = Model;
R
Gets or sets A value of zero will cause the area to be painted as a single color using the color and opacity of the last gradient stop. If the attribute is not specified, the effect is as if a value of '50%' were specified
Declaration
[JsonProperty("r")]
public double R { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node = new Node();
Node.Name = "node";
Node.Width = 100;
Node.Height = 100;
Collection Stops = new Collection();
Stops.Add(new Stop() { Color = "white", Offset = 0 });
Stops.Add(new Stop() { Color = "red", Offset = 50 });
Node.Gradient = new RadialGradient() { CX = 0, CY = 50, FX = 0, FY = 50 , R = 50 , Stops = Stops };
Model.Nodes.Add(Node);
ViewData["diagramModel"] = Model;
Type
Gets or sets the type of the gradient to be applied.
Declaration
[JsonProperty("type")]
public override string Type { get; }
Property Value
Type | Description |
---|---|
System.String | "radial" |
Overrides
Examples
RadialGradient Gradient = new RadialGradient() { Type = "radial" };
Gradient.Stops.Add(new Stop() { Color = "red" });
Gradient.Stops.Add(new Stop() { Color = "pink" });
Node Node = new Node() { Gradient = Gradient };
Methods
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | Copy of the object this method is invoked against. |