Package-level declarations

Types

Link copied to clipboard
data class HeatmapDisplayPolicy(val hideContentBelow: Dp = 16.dp, val showMetricAbove: Dp = 40.dp, val showLabelAbove: Dp = 48.dp, val cellContentPadding: Dp = 6.dp, val adaptiveContent: Boolean = true, val metricFormatter: HeatmapMetricFormatter = SignedMetricFormatter)

Rules that preserve readable content in small heatmap cells.

Link copied to clipboard
data class HeatmapInteraction(val drillDownOnGroupClick: Boolean = true, val selectLeafOnClick: Boolean = true, val showTooltipOnLongClick: Boolean = false, val tooltipDurationMillis: Int, val showTooltipOnHover: Boolean = false, val tooltipHoverDelayMillis: Int = 400)

Defines how a Heatmap updates HeatmapState for its built-in tap targets.

Link copied to clipboard
data class HeatmapLabels(val noData: String = "No data", val selected: String = "Selected", val notSelected: String = "Not selected", val currentGroup: String = "Current group", val openGroup: String = "Open group", val navigate: String = "Navigate to", val showDetails: String = "Show details", val metric: String = "metric", val enabled: String = "Enabled", val disabled: String = "Disabled", val back: String = "Back", val value: String = "value")

User-facing defaults. Override through LocalHeatmapLabels for localization.

Link copied to clipboard

Optional content rendered above the default label and metric for a sufficiently large leaf.

Link copied to clipboard

Formats a node's signed metric for the default heatmap cell.

Link copied to clipboard
data class HeatmapMotion(val enabled: Boolean = true, val durationMillis: Int = 180, val initialScale: Float = 0.98f, val pressScale: Float = 0.97f, val pressedAlpha: Float = 0.92f, val pressDurationMillis: Int = 90)

Visual transition settings used when the visible drill-down level changes.

Link copied to clipboard

State holder for drill-down navigation in Heatmap.

Link copied to clipboard
data class HeatmapStyle(val borderColor: Color = Color.White, val groupHeaderColor: Color = Color.White, val groupHeaderTextColor: Color = Color(0xFF252525), val selectedBorderColor: Color = Color(0xFF0F172A), val leafTextColor: Color = Color.White)

Visual defaults used by Heatmap and DefaultHeatmapCell.

Link copied to clipboard

Optional replacement for the built-in tooltip body. The callback dismisses the tooltip.

Link copied to clipboard
fun interface HeatmapValueFormatter

Formats the source value announced for a heatmap leaf.

Link copied to clipboard

Convenience formatter for metrics expressed as percentages.

Link copied to clipboard

Default formatter that preserves the source value's decimal representation.

Link copied to clipboard

Default domain-neutral metric formatter.

Properties

Link copied to clipboard

Formatter used by default cell semantics and tooltip content.

Functions

Link copied to clipboard
fun DefaultHeatmapCell(node: HeatmapNode, modifier: Modifier = Modifier, displayPolicy: HeatmapDisplayPolicy = HeatmapDisplayPolicy(), color: Long? = node.color, selected: Boolean = false, selectedBorderColor: Color = Color.Black, contentColor: Color = Color.White, logoContent: HeatmapLogoContent? = null)

Default leaf renderer.

Link copied to clipboard
fun DefaultHeatmapTooltip(node: HeatmapNode, metricFormatter: HeatmapMetricFormatter = SignedMetricFormatter, modifier: Modifier = Modifier, onDismissRequest: () -> Unit)

Default long-press detail popup.

Link copied to clipboard
fun Heatmap(state: HeatmapState, modifier: Modifier = Modifier, displayPolicy: HeatmapDisplayPolicy = HeatmapDisplayPolicy(), style: HeatmapStyle = HeatmapStyle(), interaction: HeatmapInteraction = HeatmapInteraction(), colorScale: HeatmapColorScale = SignedMetricColorScale(), logoContent: HeatmapLogoContent? = null, onGroupClick: (HeatmapNode) -> Unit = {}, onLeafClick: (HeatmapNode) -> Unit = {}, onLeafLongClick: (HeatmapNode) -> Unit = {}, onLeafHover: (HeatmapNode?) -> Unit? = null, cellContent: @Composable (HeatmapNode, Modifier) -> Unit = { node, cellModifier -> DefaultHeatmapCell( node = node, modifier = cellModifier, displayPolicy = displayPolicy, color = node.color ?: colorScale.colorOf(node), selected = state.isSelected(node), selectedBorderColor = style.selectedBorderColor, contentColor = style.leafTextColor, logoContent = logoContent, ) }, motion: HeatmapMotion = HeatmapMotion(), tooltipContent: HeatmapTooltipContent? = null)

Renders the visible level in state using the size supplied by modifier's parent.

Link copied to clipboard
fun HeatmapBackButton(onClick: () -> Unit, enabled: Boolean, modifier: Modifier = Modifier, label: String? = null)

A small platform-neutral navigation control for heatmap sample chrome.

Link copied to clipboard
fun HeatmapBreadcrumb(state: HeatmapState, modifier: Modifier = Modifier, separator: String = " / ")

A compact breadcrumb intended to be displayed above a Heatmap.

Link copied to clipboard
fun HeatmapLegend(entries: List<HeatmapLegendEntry>, modifier: Modifier = Modifier, indicatorSize: Dp = 12.dp, contentColor: Color = Color(0xFF252525))

A compact, platform-independent legend for a heatmap color scale.

Link copied to clipboard

Creates and remembers a drill-down state for root.