Class ColorStop
Gets or sets the color range properties for the gradient.
Inheritance
Namespace: Syncfusion.Blazor.LinearGauge
Assembly: Syncfusion.Blazor.dll
Syntax
public class ColorStop : OwningComponentBase
Constructors
ColorStop()
Declaration
public ColorStop()
Properties
Color
Gets or sets the color of the gradient stop.
Declaration
public string Color { get; set; }
Property Value
Type | Description |
---|---|
System.String | The color value in a hex code or named color format. The default value is "#000000". |
Remarks
Changing this property will update the corresponding color in the gradient of the linear gauge.
Offset
Gets or sets the position of the color stop in the gradient, expressed as a percentage.
Declaration
public string Offset { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the offset percentage of the color stop. The default value is "0%". |
Remarks
The offset determines where the color stop begins and ends within the gradient.
Opacity
Gets or sets the opacity level of the color stop in the gradient.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the opacity, where 1 is fully opaque and 0 is fully transparent. The default value is 1. |
Remarks
This property controls the transparency of the color at this gradient stop.
Style
Gets or sets the custom styles for the color stop in the gradient.
Declaration
public string Style { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that contains CSS styles to be applied to the gradient's color stop. Default is an empty string. |
Remarks
Use this property to apply additional styling to the color stop, enhancing the gradient's appearance.
Methods
Dispose(Boolean)
Disposes the property values during the destroy of the component that is hold up for the execution of the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
OnInitializedAsync method is called when the component has received its initial parameters.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
OnParametersSetAsync()
OnParametersSetAsync is a lifecycle method that is invoked when the component has received parameters, and the incoming values have been assigned to the properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |