alexa
menu

Blazor Toolkit

    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
    System.Object
    SfBaseComponent
    ChartSubComponent
    LinearGradient
    ChartLinearGradient
    Implements
    System.IAsyncDisposable
    Inherited Members
    SfBaseComponent.DisposeAsync()
    Namespace: Syncfusion.Blazor.Toolkit.Charts
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public class LinearGradient : ChartSubComponent, IAsyncDisposable, ISubcomponentTracker, IChartElement
    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
    public double X1 { get; set; }
    Property Value
    Type Description
    System.Double

    A System.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
    public double X2 { get; set; }
    Property Value
    Type Description
    System.Double

    A System.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
    public double Y1 { get; set; }
    Property Value
    Type Description
    System.Double

    A System.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
    public double Y2 { get; set; }
    Property Value
    Type Description
    System.Double

    A System.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

    System.IAsyncDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved