← All projects
ChartLib icon

ChartLib

Kotlin Multiplatform · Compose Multiplatform · Android, iOS, wasmJs

The candlestick chart behind Hyprr and FreqDroid, pulled out into its own library once both apps needed the same thing. One composable takes a list of candles plus whatever overlays you have, and each overlay is optional.

Features

  • Candlesticks with OHLCV rendering and volume bars
  • Indicators as lines, bars or scatter, on the price chart or in their own subplots, with values in an overlay
  • Pinned Y-ranges per subplot and reference lines (solid, dashed, dotted)
  • Gestures: pinch-to-zoom around the touch point, horizontal pan, Y-axis drag to rescale price, long-press crosshair with an OHLCV readout
  • Trade markers for entries and exits with profit labels, themable colours and pluggable shapes
  • Price lines with right-axis labels, annotations (areas, lines, points) and Heikin-Ashi candles

Usage

Published to my Gogs-hosted Maven repository:

commonMain.dependencies {
    implementation("com.codeskraps.chartlib:chartlib:1.2.0")
}
CandlestickChart(
    candles = candles,
    prevDayPx = 50_000.0,
    modifier = Modifier.fillMaxSize()
)
ChartLib in Hyprr: candles with indicators ChartLib in FreqDroid: candles with indicator subplots

Posts