linear

fun linear(angleDegrees: Float, colors: List<Color>, span: GradientSpan = GradientSpan.Shape): ChartGradient.Linear(source)

Returns a gradient through colors at angleDegrees, clockwise from left-to-right.

The angle is measured in the bounds' fractions, so 45 runs from the top-left corner to the bottom-right corner whatever the bounds' shape. At multiples of 45 degrees the gradient reaches both corners it runs between; at other angles on non-square bounds, it holds its end colors near those corners.