Hi,
Im tried to convert date into xAxis using this tutorial
but i got this error
Java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object com.scichart.data.numerics.math.IMath.fromDouble(double)' on a null object reference
here my code
https://gist.github.com/ngiyus/4590c009261a28dba2c8b10e123a97f3
- Yuda Susanto asked 3 years ago
- You must login to post comments
Hi there,
I took a look on your code. Unfortunately I couldn’t create a working project from your code, but I think I was able identify cause of issue. It look like this exception occurs because you call transformDataToIndex() immediately after creation of axis and it wasn’t rendered by chart yet ( by default rendering occurs on separate thread and executed asynchronously when something changes in chart ). Because of this label provider isn’t located data series which should be used to map dates to indices and math required for conversion.
May I ask why do you need to call this method right after creation? Anyway I’m going to create a task to investigate how we can fix this, and as workaround I would suggest to delay calling this method untill chart will be rendered for the first time or just get index of desired Date from dataSeries directly ( or from priceSeries if they available )
Best regards,
Yura
- Yura Khariton answered 3 years ago
-
I want to notify you that this issue should be fixed in our internal build and fix will be available with our next nightly build in our Maven repository
- You must login to post comments
Please login first to submit.