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.
Inheritance
ChartGradientColorStops
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartGradientColorStops : ChartSubComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
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.Charts
<SfChart>
<ChartSeriesCollection>
<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>
</ChartSeriesCollection>
</SfChart>
Constructors
ChartGradientColorStops()
Declaration
public ChartGradientColorStops()