Class LinearGradient
Represents the options for configuring a linear gradient used to paint chart elements in the chart component.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class LinearGradient : ChartSubComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
Use LinearGradient to define a directional color blend that can be applied to chart visuals such as series, markers and legend symbols.
A linear gradient typically consists of a direction (for example, from top to bottom or left to right) and one or more gradient stops
that specify colors at given offsets. After defining the gradient, reference it from a paintable property (for example, Fill)
using the syntax url(#gradientId).
Constructors
LinearGradient()
Declaration
public LinearGradient()
Properties
X1
Gets or sets the x-coordinate of the starting point of the linear gradient.
Declaration
[Parameter]
public double X1 { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value representing the start x-coordinate. The default value is |
Remarks
Defines the origin on the x-axis for the gradient direction. Values are commonly specified in the normalized range 0 to 1.
X2
Gets or sets the x-coordinate of the endpoint for the linear gradient.
Declaration
[Parameter]
public double X2 { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value representing the end x-coordinate. The default value is |
Remarks
Determines the end position on the x-axis to control the gradient direction. Values are commonly specified in the normalized range 0 to 1.
Y1
Gets or sets the y-coordinate of the starting point of the linear gradient.
Declaration
[Parameter]
public double Y1 { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value representing the start y-coordinate. The default value is |
Remarks
Defines the origin on the y-axis for the gradient direction. Values are commonly specified in the normalized range 0 to 1.
Y2
Gets or sets the y-coordinate of the endpoint for the linear gradient.
Declaration
[Parameter]
public double Y2 { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value representing the end y-coordinate. The default value is |
Remarks
Determines the end position on the y-axis to control the gradient direction. Values are commonly specified in the normalized range 0 to 1.