-
-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Steps to reproduce:
- Pass an empty list to
LineChart() - Run the app
- Crash occurs
Expected behavior:
The chart should render nothing or show just the lines
Environment:
- ComposeCharts version: 0.2.0
- Android version: Android 14
- Kotlin version: 2.2.20
- Jetpack Compose version: 2025.07.00
Trace:
java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0. at kotlin.collections.EmptyList.get(Collections.kt:37) at kotlin.collections.EmptyList.get(Collections.kt:25) at ir.ehsannarmani.compose_charts.LineChartKt.LineChart_tpvImbo$showPopup(LineChart.kt:272) at ir.ehsannarmani.compose_charts.LineChartKt.access$LineChart_tpvImbo$showPopup(LineChart.kt:1) at ir.ehsannarmani.compose_charts.LineChartKt$LineChart$12$4$1$2$2$1.invokeSuspend(LineChart.kt:396) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:79) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:224) at android.os.Looper.loop(Looper.java:318) at android.app.ActivityThread.main(ActivityThread.java:8763) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)