Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/** filling the area under the path */
val fillPath = android.graphics.Path(stroke.asAndroidPath())
.asComposePath()
.apply {
lineTo(xAxisSpace * xValues.last(), size.height - yAxisSpace)
lineTo(xAxisSpace, size.height - yAxisSpace)
close()
}
drawPath(
fillPath,
brush = Brush.verticalGradient(
listOf(
Color.Cyan,
Color.Transparent,
),
endY = size.height - yAxisSpace
),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment