alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ChartRadialGradient

    Represents options to configure a radial gradient for a chart ChartSeries, technical ChartIndicator, or ChartTrendline within the SfChart component.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ChartSubComponent
    RadialGradient
    ChartRadialGradient
    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
    RadialGradient.Cx
    RadialGradient.Cy
    RadialGradient.Fx
    RadialGradient.Fy
    RadialGradient.R
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartRadialGradient : RadialGradient, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    ChartRadialGradient is a child component that inherits from RadialGradient. Set the center with Cx and Cy, the focal point with Fx and Fy, and the radius with R. Define color transitions using ChartGradientColorStops containing one or more ChartGradientColorStop elements.

    Coordinates are typically normalized to 0..1 relative to the gradient box; (0.5, 0.5) centers the gradient, and R="0.5" covers roughly half the box. Stop Offset may be specified as 0..1 or 0..100 (percent).

    When placed under ChartSeries, ChartIndicator, or ChartTrendline, the gradient is applied automatically.

    Examples
    @using Syncfusion.Blazor.Charts
    
    <SfChart>
        <ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" />
        <ChartSeriesCollection>
            <ChartSeries Name="Series1"
                        Type="ChartSeriesType.Line"
                        DataSource="@Data"
                        XName="Month"
                        YName="Value">
                <ChartRadialGradient Cx="0.5" Cy="0.5" Fx="0.5" Fy="0.5" R="0.4">
                    <ChartGradientColorStops>
                        <ChartGradientColorStop Offset="0"   Color="#EE4256" Opacity="1" />
                        <ChartGradientColorStop Offset="100" Color="#6D83B8" Opacity="1" />
                    </ChartGradientColorStops>
                </ChartRadialGradient>
            </ChartSeries>
        </ChartSeriesCollection>
    </SfChart>
    
    @code {
        public class Point { public string Month { get; set; } = ""; public double Value { get; set; } }
        public List<Point> Data = new()
        {
            new() { Month = "Jan", Value = 35 },
            new() { Month = "Feb", Value = 28 },
            new() { Month = "Mar", Value = 34 },
        };
    }

    Constructors

    ChartRadialGradient()

    Declaration
    public ChartRadialGradient()

    Implements

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