Xamarin Forms 101: How to create a barchart, linechart, radialchart, pointchart, or donutchart in Xamarin Forms

Are you searching for sample charts in Xamarin Forms?

In this post, we will create different charts with stunning visual effects in Xamarin Forms.


Creating charts now becomes easier than before. Thanks to Aloïs Deniel, who wrote the Microcharts NuGet package and made our life easier.

Here are the steps on how to create your very first set of charts in Xamarin Forms.


Step 1:

The first step is to right-click on your Solution. Then go to Manage NuGet Packages for Solution.


Step 2:

On the browse tab, type microcharts. Look for Microcharts.Forms by Aloïs Deniel.


Step 3:

Install the Microcharts.Forms NuGet package on each project in your solution.


Step 4:

Add the xmlns namespace of Microcharts library.


Step 5:

Start adding the Chart View on your XAML file.


Step 6:

Create an instance of List<Microcharts.Entry> and populate it with few Entry objects.


Step 7:

Initialize each view with different types of charts in Microcharts to see how they look.


Step 8:

Build and deploy the demo app and see the 5 different charts on your UI.


Easy right? Now if you just read this article, I recommend you to try it yourself. It will not take you 30 minutes to create a sample. Trust me. Happy coding!

Post A Comment