HowTo: Add and Edit Custom Fills in Illustrator 7 January, 2007 — Stuart Brown

Or, how to make even prettier pie charts

Posted in Design, Tutorials
Tagged with: , , , , ,

Following on from the previous pie chart tutorial, in this tutorial we'll cover exactly how to add and manipulate custom pattern fills in Illustrator - a very powerful technique that allows for some very fancy effects. We're only scratching the surface of what this sort of thing can be used for, but it you're after an effect similar to that used in the Demographics of Digg post, then this is all you need to know.

  1. In this tutorial, we'll be starting from the point where we left off with the previous tutorial. Download the illustrator file if you haven't already gone through the previous tutorial. Start Illustrator, load the file, and you should see something like this:

  2. We're going to add a custom pattern fill to each of the pie segments - in this case, we'll add a flag background to each of the segments. The first thing we need to do is make a custom pattern - and in order to do this we need to import a bitmap image. Wikipedia is a great source for the flags of the world - for the first segment I'll be using the Union Flag (UK). Use File > Place or copy & paste the image into the Illustrator document.
  3. Next, drag the flag directly onto the swatches palette to create a new pattern swatch. You can now delete the flag from the page (select it, press delete). The newly created swatch should look something like this:

  4. Now, in order to apply the pattern fill to the pie slices, we need to select the pie slice. Double click on the grouped pie chart object to edit the individual slices. (A grey border will appear around the pie chart to indicate that you've isolated it).
  5. Now, click on the pie slice to select it. Note that you need to click between the outside edge and the glossy highlight, otherwise you'll end up just selecting the highlight itself.

  6. Click on the basic fill in the appearance palette and select the flag swatch from the swatch palette. The flag pattern should be applied to the pie slice, albeit at the wrong size and position.

  7. With the pie slice still selected, select Object > Transform > Scale from the drop-down menus. Tick 'Preview' so you can see what you're doing, then untick 'Objects' and 'Scale Strokes & Effects' so that only the pattern is scaled.

  8. Adjust the Uniform Scale amount so that the flag will comfortably fit in the pie slice without being stupidly oversized or repeated. I used a value of 40% in this case, although experimentation will yield the best results.

  9. Next, we can adjust the positioning of the pattern so that it better fits the pie slice. Double click the direct selection tool (white arrow) to open the Move dialog. Make sure the 'object' checkbox is unticked.

  10. Adjust the horizontal and vertical positioning so that the flag sits nicely within the pie slice; Again, you can experiment with different positioning in this case.

  11. Once you've adjusted the positioning of the flag (and readjusted the scaling if needed), you can repeat these steps for the remaining pie slices.
  12. Once you've finished editing your pie slices, double click outside the grey isolation box to get back to the main document. You can, of course, choose your own flags to use, but here are some quick links to the ones I used: US - Canada - Germany
  13. Here's the finished result - with updated labels, of course. Now you're all set to represent country demographics, or - with creative use of other photos, logos, etc - pretty much any statistic you'd care for. For those interested, here's the Illustrator file.