Lets-Plot Compose Frontend is a Kotlin Multiplatform library that allows you to embed
Lets-Plot charts in a Compose Multiplatform (Desktop, Android) application.
Supported Targets
- Desktop (macOS, Windows, Linux)
- Android
For more details see Compose multiplatform compatibility and versioning overview.
Dependencies
Compose Multiplatform for Desktop
dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.components.resources)
// Lets-Plot Kotlin API
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-kernel:4.12.1")
// Lets-Plot Multiplatform
implementation("org.jetbrains.lets-plot:lets-plot-common:4.8.2")
implementation("org.jetbrains.lets-plot:canvas:4.8.2")
implementation("org.jetbrains.lets-plot:plot-raster:4.8.2")
// Lets-Plot 'image export' (optional - enables exporting to raster formats)
implementation("org.jetbrains.lets-plot:lets-plot-image-export:4.8.2")
// Lets-Plot Compose UI
implementation("org.jetbrains.lets-plot:lets-plot-compose:3.0.2")
}See example: Compose desktop demo.
Compose Multiplatform for Android
dependencies {
// Lets-Plot Kotlin API
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-kernel:4.12.1")
// Lets-Plot Multiplatform
implementation("org.jetbrains.lets-plot:lets-plot-common:4.8.2")
implementation("org.jetbrains.lets-plot:canvas:4.8.2")
implementation("org.jetbrains.lets-plot:plot-raster:4.8.2")
// Lets-Plot Compose UI
implementation("org.jetbrains.lets-plot:lets-plot-compose:3.0.2")
}See example: Android minimal demo.
More Examples
You will find complete examples of using Lets-Plot Kotlin API with Lets-Plot Compose Frontend in the following
GitHub repository: JetBrains/lets-plot-compose-demos.
Change Log
See CHANGELOG.md.
Code of Conduct
This project and the corresponding community are governed by the JetBrains Open Source and Community Code of Conduct. Please make sure you read it.
License
Code and documentation released under the MIT license. Copyright © 2023, JetBrains s.r.o.
