Class ChartGradientColorStops
Represents the collection of color stops for the gradient fill of a chart ChartSeries. These stops determine how the colors blend across the gradient.
Implements
System.IAsyncDisposable
Inherited Members
Namespace: Syncfusion.Blazor.Toolkit.Charts
Assembly: Syncfusion.Blazor.Toolkit.dll
Syntax
public class ChartGradientColorStops : ChartSubComponent, IAsyncDisposable, ISubcomponentTracker
Remarks
Use ChartGradientColorStops as a child of ChartLinearGradient or ChartRadialGradient to define the ordered set of ChartGradientColorStop entries that form the gradient. At least two stops (for example, offsets 0 and 100) are recommended to produce a visible transition.
Stops are applied in ascending order of Offset. For consistent results, ensure offsets are within the 0–100 range and colors/opacity are set as required by your design.
Examples
@using Syncfusion.Blazor.Toolkit.Charts
<SfChart>
<ChartSeries Type="ChartSeriesType.Column"
XName="Category"
YName="Value">
<ChartLinearGradient X1="0" Y1="0" X2="1" Y2="0">
<ChartGradientColorStops>
<ChartGradientColorStop Offset="0" Color="#42A5F5" Opacity="1" />
<ChartGradientColorStop Offset="100" Color="#1E88E5" Opacity="1" />
</ChartGradientColorStops>
</ChartLinearGradient>
</ChartSeries>
</SfChart>
Constructors
ChartGradientColorStops()
Declaration
public ChartGradientColorStops()
Implements
System.IAsyncDisposable