Copy link to clipboard
Copied
Hi,
I am trying to make a chart, everything is perfect except a tiny gap in-between the shapes.
Math says, 77+6+5+12= 100.
So if my trim path’s end value is set perfectly and each carries individually all those numbers I should have a perfect circle without any gap. What makes this gap exist?
My math is correct so is the trim path value.
Please guide me, all I am seeing is birds and starts around my head..
First, you only want one shape layer. Here are the steps:
Copy link to clipboard
Copied
First, you only want one shape layer. Here are the steps:
There you go. It should take about 5 minutes to get the pie chart on a single layer.
You can set up some simple math to get the percentage remaining. Just subtract the previous End value from the current one. You could do this with sliders. Four parts means four sliders. Here are the expressions for the four parts, starting with the top ellipse/trim/end property:
// Top Ellipse/End
effect("Pie 1")("Slider");
// Second Ellipse/End
effect("Pie 2")("Slider")+content("Ellipse 2").content("Trim Paths 1").end;
// Third Ellipse/End
effect("Pie 3")("Slider")+content("Ellipse 3").content("Trim Paths 1").end;
// Fourth Ellipse/End
effect("Pie 4")("Slider") + content("Ellipse 4").content("Trim Paths 1").end;
You can get fancy with the expressions to ensure the total is not more than 100%. You can also tie text layers to the slider values to display the percentage of each piece of the pie.
You can create animation presets that combine these properties into a shape layer to build as many pieces of the pie as you like.
I have included a sample project that you can look at. It works like this:
Copy link to clipboard
Copied
😮
I am eternally grateful to you for taking the time to reply me and show me how to do it correctly.., I dnt know what I would do if torchbearer like you do not help newbies like me. This is soooo cool.
Thank you sooooooooooooo much.