GridLines

data class GridLines(val color: Color = Color.LightGray, val lineWidth: Dp = 1.dp, val pathEffect: PathEffect? = null, val alpha: Float = 1.0f, val colorFilter: ColorFilter? = null, val blendMode: BlendMode = DrawScope.DefaultBlendMode, val enableHorizontalLines: Boolean = true, val enableVerticalLines: Boolean = true, val drawHorizontalLines: DrawScope.(Float, Float, Float) -> Unit = { xStart, y, xEnd -> drawLine( color = color, start = Offset(xStart, y), end = Offset(xEnd, y), strokeWidth = lineWidth.toPx(), pathEffect = pathEffect, colorFilter = colorFilter, blendMode = blendMode ) }, val drawVerticalLines: DrawScope.(Float, Float, Float) -> Unit = { x, yStart, yEnd -> drawLine( color = color, start = Offset(x, yStart), end = Offset(x, yEnd), strokeWidth = lineWidth.toPx(), pathEffect = pathEffect, colorFilter = colorFilter, blendMode = blendMode ) })

Represents the grid lines for any graph

Parameters

color

: Defines the color of the grid lines.

lineWidth

: Defines the width of the lines.

pathEffect

optional effect or pattern to apply to the line.

alpha

Opacity to be applied to the path from 0.0f to 1.0f representing. fully transparent to fully opaque respectively.

colorFilter

ColorFilter to apply to the color when drawn into the destination.

blendMode

Blending algorithm to be applied to the path when it is drawn.

enableHorizontalLines

False to disable horizontal line else true.

enableVerticalLines

False to disable vertical lines else true.

drawHorizontalLines

Draw param used to draw the horizontal lines with given input params.

drawVerticalLines

Draw param used to draw the vertical lines with given input params.

Constructors

Link copied to clipboard
constructor(color: Color = Color.LightGray, lineWidth: Dp = 1.dp, pathEffect: PathEffect? = null, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode, enableHorizontalLines: Boolean = true, enableVerticalLines: Boolean = true, drawHorizontalLines: DrawScope.(Float, Float, Float) -> Unit = { xStart, y, xEnd -> drawLine( color = color, start = Offset(xStart, y), end = Offset(xEnd, y), strokeWidth = lineWidth.toPx(), pathEffect = pathEffect, colorFilter = colorFilter, blendMode = blendMode ) }, drawVerticalLines: DrawScope.(Float, Float, Float) -> Unit = { x, yStart, yEnd -> drawLine( color = color, start = Offset(x, yStart), end = Offset(x, yEnd), strokeWidth = lineWidth.toPx(), pathEffect = pathEffect, colorFilter = colorFilter, blendMode = blendMode ) })

Properties

Link copied to clipboard
val alpha: Float = 1.0f
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pathEffect: PathEffect? = null