Skip to content
项目

关于

将数据编织成令人着迷的 Jetpack Compose 图表——无需魔法药剂!📜🔮

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+3
1个月
+3

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Charty

Banner

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. Built with ❤️ by @hi-manshu.

Charty Charty Static Check GitHub Repo stars AndroidWeekly Twitter Follow

📖 Documentation · ▶️ Playground · 📝 Changelog

Every chart has a page with a picture, the code that produced it, and its full configuration. The playground runs all 35 of them in your browser, every option exposed as a control you can turn.


Install

commonMain.dependencies {
    implementation("com.himanshoe:charty:3.0.0")
}

Projected 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.

implementation("com.himanshoe:charty-3d:1.0.0")

Your first chart

LineChart(
    data = { listOf(LineData("Mon", 20f), LineData("Tue", 45f), LineData("Wed", 30f)) },
    color = ChartyColor.Solid(ChartyColors.Blue),
)

Then add interactions and styling declaratively:

LineChart(
    data = { priceData },
    color = ChartyColor.Solid(ChartyColors.Blue),
    lineConfig = LineChartConfig(
        interpolation = LineInterpolation.SMOOTH,
        downsampleThreshold = 800,          // stays smooth over huge series
    ),
    crosshair = ChartCrosshair(),            // draggable guide line and label
)

👉 Quick start

What you get

  • 35 chart types — bar and its dozen variants, line, area, scatter, bubble, combo, pie, radar, gauges, candlestick, calendar and matrix heatmaps, Gantt, funnel, and projected 3D.
  • Five targets from one API — Android (minSdk 24), iOS, JVM desktop, JavaScript and WebAssembly.
  • Live data — a rolling window that slides as points arrive, scrollback through history, and a jump-to-latest pill.
  • Interactions — a draggable crosshair that can sync across charts, tooltips drawn as your own Composable, persistent markers, zoom, pan, and brush selection.
  • Theming — one ChartyTheme carrying typography, colours, shapes and dimensions that every chart resolves its config against.
  • PNG export, LTTB downsampling for large series, per-point screen-reader traversal, and an Android baseline profile shipped in the AAR.

Apps using Charty

App Link
🐱 NEKO github.com/nekomangaorg/Neko
⏱️ TimePlanner github.com/v1tzor/TimePlanner

Using Charty? Open a PR to add your app.

Contributing

The documentation site is generated from the markdown in docs/charty — edit the page, not the HTML. ./gradlew :docsite:assembleSite builds the whole site locally and fails on a dead link.

Support

If Charty helps you, please ⭐ the repo — it genuinely helps.

Sponsor Buy Me a Coffee

License

Copyright 2025 The Charty Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

探索相关项目

加载中…