Members Only

5 Ways to Get Pie Charts into InDesign

This article appears in Issue 85 of InDesign Magazine.

In an analytical world, pie charts can help to serve up your data in a tasty way.

Everyone likes pie (charts), right? Pie charts are one of the most common methods of visually representing data. Not only are they visually pleasing, but they help readers to easily understand the information in a logical, intuitive way. InDesign doesn’t natively contain a tool you can use to create pie charts directly. That doesn’t mean that you’re out of luck, though. When it comes to creating pie charts in InDesign, I’ve seen a number of different approaches, and I’d like to show you five different ways that you can get pie charts into an InDesign document, each with their own benefits and downfalls depending on your workflow.

1. Create Them in InDesign

Even without a Pie tool we might wish for, you can still build your own pie charts natively in InDesign using the shape tools, the Pathfinder panel, and a little bit of math. Start by drawing a circle in InDesign using the Ellipse tool to the size that you want the pie chart to appear. Copy the circle to the clipboard, as you’ll need it again later. Next, use the Pathfinder panel options to subdivide the circle into the appropriate pieces. I accomplish this by drawing a black square on top of the circle and positioning it in one of the quadrants of the circle, which of course eliminates 25% of the circle. In my example, let’s say the first value that I need is 52%, so I need to eliminate 48% of the entire circle. I’m already down 25% with my original square,  so I copy that square to cover up another quadrant of the circle. To determine how to reveal an additional 2% of the circle, I did a

little bit of basic math and divided 360 by 100, which gave me 3.6. So 3.6 degrees of a circle equates to 1% of the circle. Using the Rotate tool, I rotated the second square –7.2° (3.6·2) to reveal the appropriate amount of the circle (Figure 1).

Figure 1: Rotate the square to reveal the appropriate amount of the circle.

Figure 1: Rotate the square to reveal the appropriate amount of the circle.

Finally, I selected all of the shapes, and clicked Subtract in the Pathfinder panel to remove the square shapes from the circle, leaving the appropriate amount of the overall pie chart (Figure 2).
Figure 2: The circle, after using the Subtract command.

Figure 2: The circle, after using the Subtract command.

Temporarily hide this piece by choosing Object > Hide, and then choose Edit > Paste in Place to put a fresh circle in the document in the exact same position. I also find it helpful to copy the black boxes from the previous wedge so I have a point of reference for where to start the next wedge. Repeat the process above to eliminate the portions of the circle to create the remaining wedges for the pie chart (Figure 3). If you’re going to be using this technique a lot, consider organizing your document with layers for the different sections of the chart.
Figure 3: The final pie chart, created entirely in InDesign.

Figure 3: The final pie chart, created entirely in InDesign.

2. Illustrator’s Graph Tool

Adobe Illustrator has contained a Pie Graph tool since the dawn of time. Well, maybe not quite that long, but you get the idea. Although it has been there for some time, a lot of users overlook this powerful tool. The nice thing about the graph tools in Illustrator is that they automatically generate graphs based on the data that you input. Start by selecting the Pie Graph tool in Illustrator, and click and drag on the artboard to define the size of the pie you want to create. The graph data window immediately displays, so you can enter the values for the chart. Type in the appropriate values to represent the data in the pie chart, and click the Apply button ; Illustrator generates the graph based on the data. If you have data that exists in a text file or Excel sheet, Illustrator allows you to import that data into the Graph Data window (Figure 4) via the Import Data button.

Figure 4: The Graph Data window in Illustrator.

Figure 4: The Graph Data window in Illustrator.

If you’d like a legend for your pie chart, you can enter information that the data represents in quotes in the row above the data. When you click the Apply button, Illustrator will generate a legend for the chart. When you’re finished entering data for the chart, simply close the graph data window. You can retrieve the window at any time by selecting the chart and choosing Object > Graph > Data. By default, all charts are created using tints of black. To add color to your chart, you can use the Direct Selection tool to modify each wedge of the chart. If you’ve created a legend, though, you’ll want to make use of the Group Selection tool, as it allows you to select the wedge, and with a second click, the corresponding legend property as well (Figure 5).
Figure 5: The Illustrator pie chart with legend.

Figure 5: The Illustrator pie chart with legend.

3. The Chartwell Font

Created by Travis Kochel out of a need for a simple way to create graphs within design applications, Chartwell uses OpenType ligatures to render graphs out of text entered using the font. To get started, type numbers to represent the values in your pie chart, and separate those values using the plus sign (+). Apply a color to each value that you want the color to represent (Figure 6).

 Figure 6: Type the values separated by a “+” sign.

Figure 6: Type the values separated by a “+” sign.

Next, change the text to the Chartwell font you wish to use. For a pie chart, you’ll choose the Chartwell Pies font, but there are also Chartwell Bars, Chartwell Bars Vertical, Chartwell Lines, Chartwell Radar, Chartwell Rings, and Chartwell Rose for creating a variety of other charts as well. After formatting the text using the Chartwell Pies font, you more than likely won’t see much of a change. In order to render the chart, you need to enable discretionary ligatures in the OpenType menu, which can be found in the panel menu of the Control panel or the Character panel. Once enabled, the chart will render as a true pie chart, using the colors that you applied to the values for the chart (Figure 7).
Figure 7: Pie chart created using the Chartwell Pies font.

Figure 7: Pie chart created using the Chartwell Pies font.

It’s important to keep the tracking set to 0 when using the Chartwell fonts to avoid “breaking” the appearance of the chart. There are other tricks that you can use to tweak the appearance of the finished chart; you can learn how to apply those from the manual included with the Chartwell font. Also, be sure to check out the review of Chartwell fonts in issue 78.

4. Microsoft Excel

Most people won’t refute the number- crunching capabilities of Microsoft Excel or its ability to create pie charts and other chart types from that data. Yet as good as Excel’s number-crunching is, its graphics capabilities leave a bit to be desired, which makes it challenging to get an Excel chart into InDesign. Although InDesign can place an Excel spreadsheet as a table, it doesn’t recognize any of the charts within the Excel file. There are primarily two ways to get a chart from Excel into InDesign. First, you can save the Excel chart as a PDF file, which can then be placed into InDesign. However, your control over the conversion of the file to PDF can be limited. Also, Excel works in the RGB world and tends to render black text and lines using RGB color—not ideal for professional print jobs. Another option is to copy the chart from Excel and paste it into Adobe Illustrator (Figure 8).

Figure 8: Pie chart created by copying a chart from Excel into InDesign.

Figure 8: Pie chart created by copying a chart from Excel into InDesign.

The beauty of this method is that it retains the appearance of the Excel chart and also pastes the content as vector information that can be edited as needed. You can adjust the colors, including the RGB black that is generated by Excel. After making the necessary adjustments, the file can be saved as an Illustrator file and placed into InDesign.

5. The Claquos 2 Script

Claquos 2 is an InDesign JavaScript written for the sole purpose of providing a way to create pie charts directly within Adobe InDesign. Currently, Claquos 2 is in beta and available for free from indiscripts.com. Being that Claquos is an InDesign script, you’ll need to install it in the Scripts panel within Adobe InDesign. For instructions on how to install InDesign scripts, see this InDesignSecrets post. To use Claquos, begin by double-clicking on the ClaquosBeta.jsx script in the Scripts panel to open the Claquos dialog box (Figure 9).

Figure 9: The Claquos 2 dialog box.

Figure 9: The Claquos 2 dialog box.

In the Claquos dialog box, you’ll see all of the available options for defining the properties of the pie chart. In the Pie Data section of the dialog box, enter a label for each wedge of the pie chart and a value for each wedge. You can also click the explode or implode icon  to explode any of the wedges. In the Output section, you can choose which color mode you’d like to use when generating the chart (RGB, CMYK, or LAB). You can also choose whether you’d like to create a legend for the pie chart by enabling the Create A Legend checkbox. The Basic Settings section allows you to control the size of the pie chart, the initial angle that the chart is based on, and the direction in which the values are generated (clockwise or counter-clockwise). In the Advanced Settings section, you can choose the type of corner applied to the pie wedges, the corner angle (if applicable), the pie tint, ring size, ring tint, and explosion factor (again, if applicable). Click OK, and the pie chart will be generated based on the values that you defined (Figure 10).
Figure 10: The pie chart generated with the Claquos 2 script, including a legend.

Figure 10: The pie chart generated with the Claquos 2 script, including a legend.

The cool thing about this script is that it generates all of the components of the pie chart using native InDesign objects and groups them together, so everything is completely editable within InDesign. The indiscripts website indicates that Claquos 2 is currently in beta, and that it works in InDesign versions CS4 and CS5, but I tested it using InDesign CC 2015 and although I experienced some minor interface issues, there were no showstoppers. There’s no indication what Claquos will cost when it’s no longer in beta, but here’s hoping that Claquos remains available for the foreseeable future, and better yet, that it gets updated. For now, we’ll just need to enjoy its capabilities and the fact that it still works with the current version of InDesign.

Now Get Cooking!

With this wide range of options, each having its own strengths, you’re certain to find a, er, flavor of pie chart to suit your taste (and your workflow).

Bookmark
Please login to bookmark Close

Not a member yet?

Get unlimited access to articles and member-only resources with a CreativePro membership.

Become a Member

Comments (10)

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. If you have excel why use bizzarre solutions ? Excel have everything what y need – just import to indesign – pice of cake.

    1. Chad Chelius

      Not bizarre solutions, just alternative. Excel doesn’t give all users the options that they need.

  2. Serge Paulus

    By the way, thanks to Chad for those quick solutions I didn’t know !

  3. Serge Paulus

    What about working in Deltagraph and exporting in eps – small correction needed in Illustrator? Deltagraph is the real pro solution. I’ve made thousands of graphs of any kind in that software (poor me).

    1. Chad Chelius

      I’ve not worked with Deltagraph Serge.

  4. Mike Rankin

    Interesting piece on the pros and cons of pie charts: https://priceonomics.com/should-you-ever-use-a-pie-chart/

  5. Pie charts are poor representations of data. They are often used to obscure rather than clarify.

    The data in pie charts is represented in areas (the pie wedges), as opposed to length (such as in bar charts, column charts, and even line graphs). It is much harder for the human mind to determine small differences in areas than small differences in lengths. In pie charts with similar size wedges the wedges often have to be labeled with the percentages for you to be able to tell the difference in their sizes. Anything smaller than 15-degrees is extremely hard to differentiate. (Perhaps that’s why the numbers on analog clocks are at 15-degree increments.)

    Pie charts are pretty, but do an awful job of displaying data. I tell students to only use pie charts for one of three reasons:

    1. Your boss (or teacher/professor) requires you to use pie charts.
    2. You want a pretty graphic and don’t care about the data.
    3. You want to obscure the data.

  6. Anne-Marie Concepcion

    Curious … why do you say no pie charts …?

  7. Mr. Serge

    In general best option is not to use pie charts at all.

    1. Mike Rankin

      Some projects require charts and graphs, including pie charts. And Chad’s article is a great resource for anyone who needs to get them into InDesign.