Package io.github.koalaplot.core.util

Types

Link copied to clipboard
typealias ColorPaletteGenerator = (count: Int) -> List<Color>

ColorPaletteGenerator will create count colors.

Link copied to clipboard
annotation class ExperimentalKoalaPlotApi
Link copied to clipboard
interface HoverableElementAreaScope

Scope for the HoverableElementArea providing the hoverableElement Modifier to enable hovering element functionality and to specify the Composable to be displayed on hover.

Link copied to clipboard
enum VerticalRotation : Enum<VerticalRotation>

Functions

Link copied to clipboard
fun generateHueColorPalette(    count: Int,     saturation: Float = 0.5f,     lightness: Float = 0.5f): List<Color>

Will generate a color palette that varies the hue in even increments to obtain count colors. It uses the HSL model with the ability to separately specify the saturation and lightness of the palette colors.

Link copied to clipboard
fun HoverableElementArea(modifier: Modifier = Modifier, content: @Composable HoverableElementAreaScope.() -> Unit)

HoverableElementArea implements a component whose children may optionally provide a hover element to be displayed at the position of the mouse cursor when hovered over child component. A displayed hovered element will be confined to the bounds of the parent HoverableElementArea but may display over multiple children.

Link copied to clipboard
fun ResponsiveText(    text: String,     modifier: Modifier = Modifier,     style: TextStyle = LocalTextStyle.current,     maxLines: Int = Int.MAX_VALUE,     ellipsis: Boolean = false)

A Text composable that will auto-scale the font size up and down to fit in the containing element.

Link copied to clipboard
fun Modifier.rotateVertically(rotation: VerticalRotation): Modifier

Modifier to rotate the target Composable vertically.

Link copied to clipboard
fun Double.toString(precision: Int): String

Converts the number to a string with precision number of digits after the decimal (rounded) (e.g. 35.72 with precision = 1 will be 35.7, 35.78 with precision = 2 will be 35.80)

fun Float.toString(precision: Int): String

Converts the float receiver as a string with precision number of digits after the decimal (rounded) (e.g. 35.72 with precision = 1 will be 35.7, 35.78 with precision = 2 will be 35.80)