Jump to content
You must now use your email address to sign in [click for more info] ×

How to create a circle bar chart with different colored segments


Recommended Posts

There are several ways of accomplishing this.

This is one way that worked for me in Affinity Photo 2.

This is for 14 segments (almost any number of segments can be used).

I chose 14 segments because I needed seven segments in a half circle. More on this later.

Select the Cog Tool

Draw a (Cog) circle 
(hold Shift to draw a perfect circle with matching height and width if required)

Settings

  • Teeth:        14
  • Inner radius:    70%
  • Hole radius:     70%
  • Tooth size:     100%
  • Notch size:     0%
  • Curvature:     0%

Click Convert to Curves in the top toolbar

Layer > Geometry > Divide

After dividing the cog, the circle (cog) is gone and I now have 14 new layers, each representing one segment of the circular bar chart I need.

I only needed seven of the segments to be seen in a half circle, so I hid the other seven layers.

In my case I wanted each segment to have a unique color. So, I clicked on each layer one by one and changed the color.

Because I wanted separation between each segment I chose to add a white Stroke to each segment which would match the white background I was using to visuall add separation. I chose 30 pts because this is a large (8,000 x8,000 px) circle and that amount of separation looked good for this use. Tune your stroke pt weight for your needs.
 

Link to comment
Share on other sites

A nice little tutorial which produces something useful.

I have some points that I would like to add:

  • Giving a visual example is usually a good way to show people what they can create before they try and create it themselves.
  • “Layer → Geometry → Separate Curves” does the same thing, in this case, as “Convert to Curves” and then “Layer → Geometry → Divide”.
  • People can change the gap between the ‘disk sectors’ (“segments” are a different thing, mathematically) without needing to add a stroke (which might ‘get in the way’ later) by manipulating the Tooth Size and Notch Size and using the snapping available within the tool.
  • Calling it a “bar chart” may be a bit misleading, especially as the ‘disk sectors’ are all of the same size and changing that would be a ‘big job’.
Edited by GarryP
Clarification.
Link to comment
Share on other sites

@GarryP  I had no success whatsoever when I tried your step 3. "People can change the gap between the ‘disk sectors’ (“segments” are a different thing, mathematically) without needing to add a stroke (which might ‘get in the way’ later) by manipulating the Tooth Size and Notch Size and using the snapping available within the tool."  It worked beautifully to create a perfect gap between each segment.  But it made it impossible to create curve layers thereafter.

It did remove the inner circle, but left two layers: one layer with the circle, above another layer with the cog.  There were no curve layers at all.  I tried several times, in Photo 2, Designer 2, Photo 1, Designer 1, and the Betas.  Nothing.  

With the Notch size and Curvature set at 0% (as specified by @ChrisProton) I was easily able to use your Step 2, which works perfectly.  There were now 14 curve layers and each was able to be removed and/or coloured any way I like. So  I could not access the appropriate Context Toolbar options again to adjust those cog shape settings.  

Dragging each curve layer to create a gap worked, but was a "drag."  Using an Outline effect (FX) on each curve layer was too, but had far better results (as long as one wants a border around the entire segment). 

What have I missed?

 

 


24" iMAC Apple M1 chip, 8-core CPU, 8-core GPU, 16 GB unified memory, 1 TB SSD storage, Ventura 13.6.  Photo, Publisher, Designer 1.10.5, and 2.3.
MacBook Pro 13" 2020, Apple M1 chip, 16GB unified memory, 256GB  SSD storage
,  Ventura 13.6.   Publisher, Photo, Designer 1.10.5, and 2.1.1.  
 iPad Pro 12.9 2020 (4th Gen. IOS 16.6.1); Apple pencil.  
Wired and bluetooth mice and keyboards.9_9

Link to comment
Share on other sites

Sorry, that list wasn’t meant as a step-by-step guide, it was just a non-ordered list of things I wanted to point out, which happened to be numbered. I’ve now bullet-pointed the list to (hopefully) make that a bit clearer.

Without wishing to ‘hijack’ the thread, I’ve attached a video showing how to quickly do what I think the OP is doing, but slightly differently.

The pink-ish background is only there to show that the Stroke is not needed.

The placement of the gradient stops should be more precise than I have done to get a better effect.

Watch for the thick red/green/blue lines when I manipulate the nodes of the Cog as they help you to ‘line-up’ the sides of the ‘disk sectors’ (a snapping setting may be needed but I don’t know which one).

If you want to make the ‘disk sectors’ into separate curves then that can be done with “Separate Curves” or “Geometry → Divide” as shown in earlier posts (but best to do that before the fill is added).

Hopefully this is enough to explain what I tried to explain in text above (with a few extras).

I've attached to afdesign document so people can experiment quickly.

disk-sectors-via-cog.afdesign

Edited by GarryP
Added document.
Link to comment
Share on other sites

Very elegant, @GarryP.  Your method creates all sorts of possibilities.


24" iMAC Apple M1 chip, 8-core CPU, 8-core GPU, 16 GB unified memory, 1 TB SSD storage, Ventura 13.6.  Photo, Publisher, Designer 1.10.5, and 2.3.
MacBook Pro 13" 2020, Apple M1 chip, 16GB unified memory, 256GB  SSD storage
,  Ventura 13.6.   Publisher, Photo, Designer 1.10.5, and 2.1.1.  
 iPad Pro 12.9 2020 (4th Gen. IOS 16.6.1); Apple pencil.  
Wired and bluetooth mice and keyboards.9_9

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.