com.vaadin.flow.component.charts.model.style.
Class GradientColor
All Implemented Interfaces:
Class providing gradient colors
See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColorStop
(double d, SolidColor color) Adds a color stop to the gradient
static GradientColor
createLinear
(double startX, double startY, double endX, double endY) Creates a new linear gradient between two given points.
static GradientColor
createRadial
(double centerX, double centerY, double radius) Creates a radial gradient color at a specified point with the given radius.
getStops()
-
Method Details
-
getLinearGradient
Returns:
The linear gradient
-
getRadialGradient
Returns:
The radial gradient
-
getStops
Returns:
The stops of the gradient color
-
addColorStop
Adds a color stop to the gradient
Parameters:
d
- The relative point of the color stop, between 0 and 1color
- The color at the point defined by d -
createLinear
Creates a new linear gradient between two given points. Use
addColorStop(double, SolidColor)
to define the colors.Parameters:
startX
- The relative start point on the X-axis, 0..1startY
- The relative start point on the Y-axis, 0..1endX
- The relative end point on the X-axis, 0..1endY
- The relative end point on the Y-axis, 0..1Returns:
A new linear gradient color
-
createRadial
Creates a radial gradient color at a specified point with the given radius. Use
addColorStop(double, SolidColor)
to define the colors.Parameters:
centerX
- The X coordinate of the centercenterY
- The Y coordinate of the centerradius
- The radiusReturns:
A new radial gradient
-