charty

Compose Multiplatform

Charts that go everywhere Kotlin does

A sleek, lightweight charting library for Jetpack Compose — and, uniquely, for Kotlin Multiplatform: one codebase renders your charts on Android, iOS, Desktop, and the Web.

  • 35 charts
  • 5 targets
  • minSdk 24
  • Apache 2.0
Kotlin
LineChart(    data = { listOf(LineData("Mon", 20f), LineData("Tue", 45f), LineData("Wed", 30f)) },    color = ChartyColor.Solid(ChartyColors.Blue),    lineConfig = LineChartConfig(interpolation = LineInterpolation.SMOOTH),    crosshair = ChartCrosshair(),)
Charty — an elementary compose library

Drag to reveal the code, or the charts it draws.

Write once

One dependency, one API, and the same rendering on every target.

Android minSdk 24, with a baseline profile in the AAR
iOS arm64 and simulator
Desktop JVM, any OS
Web JavaScript and WebAssembly
Kotlin
commonMain.dependencies {    implementation("com.himanshoe:charty:3.0.0")    implementation("com.himanshoe:charty-3d:1.0.0")}

The 3D charts are a separate artifact on its own version, and every declaration in it is @ChartyExperimental — see charty-3d for the opt-in, and for an honest account of what tilting a chart costs you.

And it is quick

Charty reduces a large series to a shape-preserving subset before drawing, so a 50,000-point line stays interactive. Measured with JMH on a development machine — treat them as orders of magnitude rather than guarantees.

0.16 msLTTB downsample, 50,000 to 800 points
0.09 msAxis min and max over 50,000 points
0.07 ms10,000 value-to-pixel transforms

Start with a chart on screen

Two minutes from an empty file to something rendering, on whichever platform you are on.