SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

I am still experiencing the effects of this defect despite using v2.5.0.2598 of the Android libraries. Can someone please explain to me how to circumvent this behavior? It seems silly to require a base series that is ultimately going to be replaced by real-time updates.

Cheers

Version
2.5.0.2598
  • You must to post comments
0
0

I would like to also mention you have marked my trial as expired but our company purchased a license under another name.

  • Yura Khariton
    Hi there. Unfortunately I can’t help you based on information your provided ( there is not enough information to reproduce it on our side ). If you have a license then please open a support ticket ( https://support.scichart.com/ ) and attach a code sample or project which reproduces the issue and we’ll take a look on it.
  • You must to post comments
0
0

Its easy mate. just create a data series like so:

sciChartBuilder.newXyDataSeries( Double.class, Double.class ).build();

dont add anything to the series and then try to plot. produces this:

Caused by: java.lang.ArrayIndexOutOfBoundsException: SciList: index is out of bounds – 1
at com.scichart.data.model.d.e(SourceFile:421)
at com.scichart.data.model.d.setRange(SourceFile:330)
at com.scichart.charting.model.dataSeries.XyDataSeries.updateRangeXyAt(SourceFile:336)
at com.piccolomed.smartpicc.android.activities.fragments.analytics.AnalyticsFragment.lambda$onActivityCreated$7$AnalyticsFragment(AnalyticsFragment.java:404)
at com.piccolomed.smartpicc.android.activities.fragments.analytics.-$$Lambda$AnalyticsFragment$dyKPdWwrf6wAdPgxvBj4M4fldnU.onChanged(Unknown Source:8)
at androidx.lifecycle.LiveData.considerNotify(LiveData.java:113)
at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:131)
at androidx.lifecycle.LiveData.setValue(LiveData.java:289)
at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33)

now explain?

  • Yura Khariton
    Your initial statement about drawing of empty data series conflicts with stack trace which says that your code calls updateRangeXyAt() which updates existing values in data series. In this case it’s expected behavior because you can’t update values in empty data series. This case is similar to case when you try to call set() on empty ArrayList which is part Java SDK – it will throw you the ArrayIndexOutOfBoundsException exception. To update values you need to add some values at first and then you can update them.
  • You must to post comments
0
0

Um append, insert or update produce the same results. ive debugged and not matter the case if the series does not have data prior to attempting “add” it will through the same exception. if you would like i would love to video with you and show you

  • Yura Khariton
    Can you provide a project which reproduces the issue you describe? This will allow me to debug code on my PC and tell how to fix it if it’s caused by our code. And if you don’t provide it I won’t be able to help you with this issue. Regarding video – unfortunately according to our support policy ( https://www.scichart.com/support-policy/ ) we provide support only via forums and tickets.
  • You must to post comments
0
0

Thanks for your assistance. I was able to get it resolved by adjusting how we “update” the series.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.