<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Drawing on DVLUP</title><link>/en/tags/drawing/</link><description>Recent content in Drawing on DVLUP</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 18 Apr 2019 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/drawing/index.xml" rel="self" type="application/rss+xml"/><item><title>Draw Your Own Xamarin Pie Chart dynamically</title><link>/en/blog/2019.04.18-draw-your-own-pie-chart-dynamically/</link><pubDate>Thu, 18 Apr 2019 00:00:00 +0000</pubDate><guid>/en/blog/2019.04.18-draw-your-own-pie-chart-dynamically/</guid><description>&lt;p&gt;In this tutorial, I&amp;rsquo;ll show you how to draw your own pie chart just using lines and a list of data items. The code itself is in C#, but the concept can be used on any platform that has a drawing library and ArcSegments.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="../../../en/blog/2019.04.18-draw-your-own-pie-chart-dynamically/2019-04-18_13-44-40.png" alt=""&gt;&lt;/p&gt;&#10;&lt;p&gt;You can view the entire solution in &lt;a href="https://gist.github.com/LanceMcCarthy/b64ee5afdd27b125b8b47816799306e0" target="_blank" rel="noopener"&gt;this GitHub Gist&lt;/a&gt;&#10;. Okay, let&amp;rsquo;s get started!&lt;/p&gt;&#10;&lt;h2 id="setting-up"&gt;Setting Up&lt;/h2&gt;&#10;&lt;p&gt;The first thing you&amp;rsquo;ll need to understand is how the platform&amp;rsquo;s drawing library makes arcs. In this code, I&amp;rsquo;ll be using &lt;a href="https://docs.telerik.com/devtools/xamarin/controls/path/path-overview" target="_blank" rel="noopener"&gt;RadPath&lt;/a&gt;&#10; from &lt;a href="https://www.telerik.com/xamarin-ui" target="_blank" rel="noopener"&gt;Telerik UI for Xamarin&lt;/a&gt;&#10; most libraries work the same way. RadPath lets you use a custom Geometry which has &lt;a href="https://docs.telerik.com/devtools/xamarin/controls/path/getting-started/geometry-structure#radarcsegment" target="_blank" rel="noopener"&gt;RadArcSegment&lt;/a&gt;&#10; object, which has helpful &lt;strong&gt;StartAngle&lt;/strong&gt; and &lt;strong&gt;SweepAngle&lt;/strong&gt; properties.&lt;/p&gt;</description></item></channel></rss>