jnel899 jnel899 - 1 year ago 157
C# Question

How to use danielgindi's iOS Charts Library in Xamarin.iOS?

I am a C# developer attempting to create a good looking graph for the app I am developing. I use Xamarin.iOS and Xamarin.Droid to create native apps with shared code and Web Services in C#. I found this plugin called "Charts" for iOS graphing solutions (https://github.com/danielgindi/Charts). However the examples and documentation are for Swift and Objective C. Someone created a NuGet Package for use of this library in conjunction with Xamarin, however, I was unable to find good examples or documentation for the library in C#.

(don't worry about Xamarin.Droid for this question, I am not concerned with that for now and there should be a lot of crossover anyway. Feel free to talk about Xamarin.Droid if you wish to enrich the internet with your knowledge however because I don't believe there is much information on the internet about this right now.) I am attempting to create my first chart with the library by reading the Swift documentation/examples and through trial and error. However, due to my limited experience with C#, iOS, Xamarin, and programming in general (I wrote my first C++ Hello World program less than 3 years ago) I have no clue if I am doing any of this "correctly".

If anyone has experience with this and could provide me with a simple example and/or explanation of how to create a Line Chart (or any other type of chart, any example should be a great help) I would be very grateful. In addition, if someone could point me towards an example on the internet or even a superior Library they know of that can solve Graphing solutions on iOS and Android I would be all ears. I don't believe there is any good information about this out there right now, so this question may be a good resource for others who may find themselves in my situation in the future.

Answer Source

I used github.com/oxyplot/oxyplot to solve my needs and I was able to figure out simple usage by reading the provided documentation. Thanks to Jason (http://stackoverflow.com/users/1338/jason) for telling me about OxyPlot.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download