Creating a Pie Chart in Sketch the right ( another ) way
The article below is very good, and I have another way of creating a pie chart in sketch.
What is the first thought that pops into your head when someone mentions a pie chart? I always think of the ugly pie…medium.com
The plugin version is the best i think, but this is another solution with no need of plugins, if you want to try. Here we go:
we will use math in this article.
C = 2πr or C = πd
r is the radius and d is the diameter.
The trick is I will use border instead of fills, because its better control.
I got a pie chart form Mac app Numbers’s example, and the number is 13%, 21%, 16%, 30%, 20%.
Create a Oval size is 400x400, Fills none, Borders Positions:inside, and Thickness is 400/2 = 200.
remember what I write before? C = πd, input the gap 400*3.14 = 1256,and the dash will default input a number 1 inside.
we will change the dash number to C*13% = 3.14 * 400 * 0.13 = 1256 * 0.13, that’s what we got.
YES, YOU CAN USE MATH IN THE NUMBER PLACES OF SKETCH, WHAT A GREAT.
we will create another one.
Duplicate (command + d ) the Oval layer.and move below the first one. this time the dash will be 1256 * ( 13% + 21%).
and the other parts, I think you will know how to do it.