Class GradientStop
Describes the location and color of a transition point in a ChartGradientFill.
Inheritance
Namespace: Infragistics.Documents.Excel.Charts
Assembly: IgniteUI.Blazor.Documents.Excel.dll
Syntax
public class GradientStop : Object
Constructors
GradientStop(WorkbookColorInfo, Single)
Creates a new GradientStop instance with the specified color and position.
Declaration
public GradientStop(WorkbookColorInfo color, float position)
Parameters
Type | Name | Description |
---|---|---|
WorkbookColorInfo | color | A WorkbookColorInfo instance which defines the color for this stop. |
System.Single | position | A value between 0 and 1 which defines the relative position within the fill area up to which this stop is applied. |
Properties
Color
Returns the color for this gradient stop.
Declaration
public WorkbookColorInfo Color { get; }
Property Value
Type | Description |
---|---|
WorkbookColorInfo |
Position
Returns the position of this gradient stop, as a number between 0 and 1.
Declaration
public float Position { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
The value assigned to the Position property represents a fraction of the area to which the gradient is applied.
For example, to add two stops of equal length, create one GradientStop with a position of .5 and another with a position of 1.0.
The first stop extends from the origin to the halfway point of the fill area, and the second extends from the end of the first to the endpoint of the area to be filled. For three uniform stops, use .33. .67, and 1.0 as the respective positions; for four, use .25, .5, .75, and 1.0, etc.