Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException data must be asc ordered by time #143

Open
armanTabib opened this issue Apr 9, 2024 · 0 comments
Open

IllegalStateException data must be asc ordered by time #143

armanTabib opened this issue Apr 9, 2024 · 0 comments

Comments

@armanTabib
Copy link

I add LineData to my chart and here is what happens:

java.lang.IllegalStateException: Error: Assertion failed: data must be asc ordered by time, index=7, time=1393632000, prev time=1393804800
                                                                                                    	at jsCode.assert(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:577)
                                                                                                    	at jsCode.checkItemsAreOrdered(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:12029)
                                                                                                    	at jsCode.SeriesApi.setData(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:12162)
                                                                                                    	at jsCode.Object.<anonymous>(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:13191)
                                                                                                    	at jsCode.SeriesInstanceService._findSeries(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:13171)
                                                                                                    	at jsCode.Object.functionRef(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:13126)
                                                                                                    	at jsCode.FunctionManager.call(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:12764)
                                                                                                    	at jsCode.port.onmessage(file:///android_asset/com/tradingview/lightweightcharts/scripts/app/main.js:14281)
                                                                                                    Caused by: java.lang.IllegalStateException
                                                                                                    	at com.tradingview.lightweightcharts.api.delegates.SeriesApiDelegate.setData(SeriesApiDelegate.kt:53)
                                                                                                    	at com.example.ramzinium.newPresentation.composables.home.market.MarketComposableKt$MarketComposable$2$1$2$1$1$1$2.invoke(MarketComposable.kt:274)
                                                                                                    	at com.example.ramzinium.newPresentation.composables.home.market.MarketComposableKt$MarketComposable$2$1$2$1$1$1$2.invoke(MarketComposable.kt:270)
                                                                                                    	at com.tradingview.lightweightcharts.api.delegates.ChartApiDelegate$addAreaSeries$1.invoke(ChartApiDelegate.kt:82)
                                                                                                    	at com.tradingview.lightweightcharts.api.delegates.ChartApiDelegate$addAreaSeries$1.invoke(ChartApiDelegate.kt:78)
                                                                                                    	at com.tradingview.lightweightcharts.runtime.controller.WebMessageController$BufferElement.invoke(WebMessageController.kt:186)
                                                                                                    	at com.tradingview.lightweightcharts.runtime.WebMessageChannel$1.onMessage(WebMessageChannel.kt:26)
                                                                                                    	at androidx.webkit.internal.WebMessageCallbackAdapter.onMessage(WebMessageCallbackAdapter.java:47)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil$InvocationHandlerWithDelegateGetter.invoke(BoundaryInterfaceReflectionUtil.java:162)
                                                                                                    	at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
                                                                                                    	at $Proxy12.onMessage(Unknown Source)
                                                                                                    	at WV.dP.a(chromium-TrichromeWebViewGoogle6432.aab-stable-631204033:32)
                                                                                                    	at WV.x3.handleMessage(chromium-TrichromeWebViewGoogle6432.aab-stable-631204033:20)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                    	at android.os.Looper.loop(Looper.java:288)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7880)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)

and here is index 7 and 6:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant