https://kotlinlang.org logo
#datascience
Title
# datascience
k

kevin.cianfarini

03/14/2024, 8:46 PM
I’m not sure I’m in the right place, but I’m having issues using
lets-plot-skia
on Android. I have a simple function I’m calling which was ripped from one of the demos.
Copy code
val figure = run {
        val data = mapOf(
            "time" to listOf("Lunch", "Lunch", "Dinner", "Dinner", "Dinner")
        )

        letsPlot(data) + geomBar(alpha = 0.5) {
            x = "time"
            color = "time"
            fill = "time"
        }
    }
    PlotPanel(figure = figure, modifier = Modifier.fillMaxSize()) {

    }
But every time this function gets calls I experience the following exception. Is this a known issue?
Copy code
16:28:13.677  E  FATAL EXCEPTION: main
                 Process: energy.octopus.octopusenergy.android.dev, PID: 15581
                 androidx.compose.runtime.ComposeRuntimeError: Compose Runtime internal error. Unexpected or incorrect use of the Compose internal runtime API (pending composition has not been applied). Please report to Google or use <https://goo.gle/compose-feedback>
                 	at androidx.compose.runtime.ComposerKt.composeRuntimeError(Composer.kt:4187)
                 	at androidx.compose.runtime.CompositionImpl.drainPendingModificationsForCompositionLocked(Composition.kt:679)
                 	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:717)
                 	at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1071)
                 	at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3599)
                 	at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:633)
i

Ilya Muradyan

04/02/2024, 8:01 AM
Probably better report on lets-plot GitHub: https://github.com/JetBrains/lets-plot/issues cc @Igor Alshannikov
i

Igor Alshannikov

04/02/2024, 2:45 PM
k

kevin.cianfarini

04/02/2024, 2:47 PM
Hi yeah, we had to switch approaches away from let’s plot because I wasn’t able to get into a place where I could successfully run without the compose internal issue. We settled on Vico instead.
4 Views