Telerik chart in Xamarin.Forms iOS – where’s my data?

Telerik chart in Xamarin.Forms iOS – where’s my data?

Currently I am working on a Xamarin.Forms APP for one of my customers where I use the Telerik Chart for Xamarin.Forms.

Everything worked fine on the Android platform on which the first prototype was rolled out a few weeks ago. Starting the whole thing on iOS lead to an empty chart view:

chart on iOS with no data

Of course I checked the view, the data but it all seemed to be where it should be and … it still worked on Android. So I opened a ticket at Telerik, described my issue and uploaded some sample code. On the next day they responded with an example solution where everything worked fine on iOS – also in my environment. An hour later comparing the two projects line by line I finally found one tiny little difference in the method returning the data for the chart.

Here is what I used to do:

public async Task<IEnumerable<MyDataViewModel>> LoadChartData() ...

And here is the Telerik version:

public async Task<List<MyDataViewModel>> LoadChartData() ...

That’s it – just replaced the IEnumerable with List and YES my chart view also worked on iOS.

chart on iOS with data


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.