Skip to content

JetBrains/lets-plot-compose

Repository files navigation

Lets-Plot Compose Frontend

Experimental JetBrains incubator project License MIT Latest Release

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.

Splash

Dependencies

  • Compose Multiplatform: 1.8.2 or later
  • Lets-Plot Kotlin API: 4.11.2 or later
  • Lets-Plot Multiplatform: 4.7.3 or later

Compose Multiplatform for Desktop

dependencies {
    // Lets-Plot Kotlin API
    implementation("org.jetbrains.lets-plot:lets-plot-kotlin-kernel:4.11.2")

    // Lets-Plot Multiplatform
    implementation("org.jetbrains.lets-plot:lets-plot-common:4.7.3")
    // Lets-Plot 'image export' (optional - enables exporting to raster formats)
    implementation("org.jetbrains.lets-plot:lets-plot-image-export:4.7.3")

    // Lets-Plot Compose UI
    implementation("org.jetbrains.lets-plot:lets-plot-compose:3.0.0")
}

See example: Compose desktop demo.

Compose Multiplatform for Android

dependencies {
    // Lets-Plot Kotlin API
    implementation("org.jetbrains.lets-plot:lets-plot-kotlin-kernel:4.11.2")

    // Lets-Plot Multiplatform
    implementation("org.jetbrains.lets-plot:lets-plot-common:4.7.3")
    // Lets-Plot Multiplatform Android-specific dependencies
    implementation("org.jetbrains.lets-plot:canvas:4.7.3")
    implementation("org.jetbrains.lets-plot:plot-raster:4.7.3")

    // Lets-Plot Compose UI
    implementation("org.jetbrains.lets-plot:lets-plot-compose:3.0.0")
}

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.