GridStyle

data class GridStyle(val visible: Boolean, val steps: Int, val color: Color, val lineWidth: Dp)(source)

Horizontal grid configuration shared by charts with a numeric Y axis.

Constructors

Link copied to clipboard
constructor(visible: Boolean, steps: Int, color: Color, lineWidth: Dp)

Properties

Link copied to clipboard

The grid line color.

Link copied to clipboard

The grid line stroke width in density-independent pixels.

Link copied to clipboard
val steps: Int

Number of horizontal grid intervals when Y labels are hidden. With Y labels shown, the grid draws one line per label. 0 draws no grid.

Link copied to clipboard

Whether the grid is visible.

Functions

Link copied to clipboard

Returns this with GridStyle.steps and GridStyle.lineWidth clamped. Names every field instead of using copy, so a field added to the constructor fails to compile here until it is dealt with.