The complete message is: Unsorted data occurs in the collection. The only allowed SearchMode is Exact when FindIndex() is called on an unsorted collection, but Nearest was passed in.
I started with three renderable series that all had a certain time scale (x axis). I want to add another renderable series but it uses a separate time scale (x axis). I received this error so I put the two lists (x axis and y axis data) into a dictionary and used orderby on the dictionary key (time scale x axis list). I then cleared and appended this data to my DataSeries property. The code is still throwing this exception. What does unsorted mean?
Edit: The data is ordered by the key (timespan) in ascending order before I use orderby.
I have a similar problem. When I’m running the app on my iPhone there’s no crash and the chart gets rendered with ease. But when I’m trying to run the app on the iOS Simulator it always throws the Unsorted Data error. I tried it on the Android simulator as well, but it gives me the Unsorted Data error over there too. I didn’t have time to check on a real Android phone, but I guess it could be the same. Do you guys have any idea what could that be?
P.S. I’m developing in Xamarin.iOS and Xamarin.Android.
If you’re 100% sure you have data sorted in X (have output to console window and checked it), then you may have come across a bug. In that case, let us know the conditions to recreate the bug and we will investigate as soon as possible.
Please login first to submit.