alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class LinearGradient

    Represents the options for configuring a linear gradient used to paint chart elements in the chart component.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ChartSubComponent
    LinearGradient
    ChartLinearGradient
    StockChartLinearGradient
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.Dispose(bool)
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    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 0.

    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 0.

    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 0.

    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 0.

    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.

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved