charty

WavyChart#

Best for drawing attention to a trend with continuously animated bars. Each bar is a stroked vertical sine wave running from its value down to the baseline, not a filled rectangle.

WavyChart

Kotlin
WavyChart(    data = {        listOf(            BarData(label = "Mon", value = 150f),            BarData(label = "Tue", value = 90f),            BarData(label = "Wed", value = 210f),            BarData(label = "Thu", value = 130f),        )    },    modifier = Modifier.fillMaxWidth().height(300.dp),    color = ChartyColor.Solid(Color(0xFF6650A4)),    wavyConfig = WavyChartConfig(        barWidthFraction = 0.8f,        waveAmplitudeFractionOfBarWidth = 0.25f,        waveSegments = 40,        strokeWidthDp = 3f,        animationDurationMillis = 800,        animationEasing = FastOutSlowInEasing,        phaseOffsetPerBar = 0.3f,    ),)

The wave animation is a continuously repeating phase shift — animationDurationMillis is the period of one full cycle, not a one-shot entry duration, and it never settles. WavyChartConfig has no Animation property.

Wave shape#

Kotlin
wavyConfig = WavyChartConfig(    waveAmplitudeFractionOfBarWidth = 0.4f,    waveSegments = 64,    phaseOffsetPerBar = 0.5f,)

Rolling window#

Kotlin
wavyConfig = WavyChartConfig(visibleWindow = 12)

Keeps only the last N bars on screen; null or at least 2.

Persistent markers#

Kotlin
wavyConfig = WavyChartConfig(    visibleWindow = 12,    markers = listOf(PersistentMarker(dataIndex = -1, label = "Now")),)

A negative dataIndex counts back from the end of the drawn data, so -1 marks the newest bar.

Animating value changes#

Kotlin
wavyConfig = WavyChartConfig(animateValueChanges = true)

Bar heights tween to their new values when the data changes, independently of the ongoing wave motion.

Crosshair#

crosshair is a parameter of the chart, not of the config — WavyChartConfig has no crosshairConfig.

Kotlin
WavyChart(    data = { series },    modifier = Modifier.fillMaxWidth().height(300.dp),    color = ChartyColor.Solid(Color(0xFF6650A4)),    crosshair = ChartCrosshair(config = ChartCrosshairConfig(showHorizontalLine = false)),)

Accessibility#

A generated summary ("Wavy chart, N data points.") plus one focusable node per bar.

Kotlin
interactionConfig = ChartInteractionConfig(accessibilityDescription = "Weekly engagement")

WavyChartConfig#

PropertyTypeDefaultDescription
barWidthFractionFloat0.8fWave width as a fraction of its slot; 0f..1f
waveAmplitudeFractionOfBarWidthFloat1f/3fWave amplitude relative to bar width; non-negative
waveSegmentsInt40Line segments per wave; at least 1
animationDurationMillisInt500Period of one full wave cycle; must be positive
animationEasingEasingFastOutSlowInEasingEasing of the wave cycle
strokeWidthDpFloat3fStroke thickness in dp; must be positive
phaseOffsetPerBarFloat0fPhase stagger between adjacent bars
animateValueChangesBooleanfalseTween values on data change
markersList<PersistentMarker>emptyList()Persistent pinned labels
visibleWindowInt?nullRolling "show last N" window; null or >= 2

Limitations#