Build your own Line chart for Xamarin.Forms (Part 1)
Build your own Line chart for Xamarin.Forms with Custom renderers (Part 1) Last week I needed a line chart to plot expenses. I had two choices: use an existing library or draw the chart myself on canvas. I decided to go for the second - draw the chart using the Android Canvas API. I chose this approach because it gives me full flexibility to create a style and behaviour that match perfectly my application. Here’s the chart result: This tutorial will be composed by four points divided in two parts: 1. Xamarin.Forms custom renderer (Part 1) 2. Explore the Android Canvas API (Part 1) 3. Create a GraphView which will draw a line chart (Part 2) 4. Use it (Part 2) 1. Xamarin.Forms custom renderer Officiel documentation: https://developer.xamarin.com/guides/xamarin-forms/custom-renderer/ A custom renderer is a class used by Xamarin.Forms to define platform specific behaviours of your views. In this tutorial, we will be using a custom renderer to access the Android native Canvas API ...