• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Unwanted gap between shapes/objects

Engaged ,
Dec 02, 2023 Dec 02, 2023

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..

 

 

pie.gifpie 2.gif

Views

212

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 02, 2023 Dec 02, 2023

First, you only want one shape layer. Here are the steps:

  1. Press the Q key until you see an ellipse, and double click
  2. Spin down the Contents twirly and look for the Ellipse 1/Fill, then delete it; we don't want any fill
  3. Spin down the Ellipse1/Size and Ellipse 1/Stroke/1/Stroke size, then use the Pickwhip to tie the stroke width to the ellipse X size with an expression
  4. Right-click on the Elipse 1/Size and Reset it, then adjust the value to get the size of the pie chart you want
  5. With Ellipse 1 sel
...

Votes

Translate

Translate
Community Expert ,
Dec 02, 2023 Dec 02, 2023

Copy link to clipboard

Copied

First, you only want one shape layer. Here are the steps:

  1. Press the Q key until you see an ellipse, and double click
  2. Spin down the Contents twirly and look for the Ellipse 1/Fill, then delete it; we don't want any fill
  3. Spin down the Ellipse1/Size and Ellipse 1/Stroke/1/Stroke size, then use the Pickwhip to tie the stroke width to the ellipse X size with an expression
  4. Right-click on the Elipse 1/Size and Reset it, then adjust the value to get the size of the pie chart you want
  5. With Ellipse 1 selected, go to the add menu and choose Trim Paths
  6. Trim Paths should be below Ellipse 1/Ellipse 1 Path, spin down to reveal the End property, and set your first pie percentage
  7. If the pie is going in the wrong direction, click the direction icons to the right of Ellipse 1 (they look like two lines with dots at the end
  8. Select Contents/Elipse 1 and duplicate
  9. Here comes the trick. Set the percentage to the value of the second part of the pie and change the fill color
  10. Repeat as necessary

There you go. It should take about 5 minutes to get the pie chart on a single layer.

RickGerard_0-1701554132161.gif

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:

RickGerard_1-1701557321755.gif

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 02, 2023 Dec 02, 2023

Copy link to clipboard

Copied

LATEST

😮
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines