Hack 18 Make a Simple Bar Graph![]() ![]() This hack shows you how to create a bar graph by fiddling with some table formatting.Word can't really match a true layout or graphics program like Quark or Freehand for complex layouts and graphics, but you can use more than text and clip art to create visually appealing documents in Word.For example, say that each month you dutifully put together the company newsletter in Word. Last month, you asked everyone to cast their votes for the name of the company's new softball team (Lions, Tigers, or Bears). You want to publish the results in the newsletter using a simple bar graph like the one shown in Figure 3-15. Figure 3-15. A simple bar graph, created with a Word table![]() Of course, you'll need to do your own math when measuring the individual bars.To create the bar graph shown in Figure 3-15, first select Tools default measurement unit to points. Next, select Table four rows.With your cursor inside the table, right-click and choose Table Properties. On the Table tab, click the Options button, and change the cell margins to 0 points on all sides.Now insert the text for the first three rows, putting the percentage in the first column and the team name in the second column. Select the entire last row, right-click, and choose Merge Cells, as shown in Figure 3-16. Figure 3-16. Merging the cells in the last row![]() to the percentage of the total that each represents. If you look at the ruler at the top of the page, the right margin just passes the 432-point mark. You can round this number to 400 points and use it as your maximum. In this case, just multiply by four to translate the percentages into point widths. For 10, 30, and 60 percent, you get 40, 120, and 240 points, respectively.Next, select the first cell of the first column in the table. Hold down the Alt key and select the divider between the first and second columns. As you move the divider to the left, notice that the ruler displays the exact width of the cell, as shown in Figure 3-17. Figure 3-17. With the Alt key depressed, moving a cell divider displays exact measurements in the ruler![]() width for just under 40 points. Repeat the steps for the other two percentage cells. Now select the first cell in the table again, right-click, and choose Table Properties. Click the Cell tab and enter 40 pt in the "Preferred width" box. Repeat this step for the other two percentage cells, specifying the exact size in points.Next, type the text for the graph's caption in the fourth row of the table.Now select all three percentages and click the Right Align button on the Formatting toolbar. With your cursor in the first cell, right-click and choose Borders and Shading. Go to the Shading tab and select 30% gray shading. Repeat this for the third row, but apply black to the second, as shown in Figure 3-18. Figure 3-18. Apply shading to the bars in the graph![]() the outermost edges are set with a border. With your cursor in the table, right-click and choose Borders and Shading. Click the Borders tab, choose the Box setting, and select Table from the "Apply to" drop-down list, as shown in Figure 3-19. Figure 3-19. Applying the table border![]() Properties. Click the Table tab, click the Options button, check the "Allow spacing between cells" box, and put 6 pt as the spacing, as shown in Figure 3-20. Figure 3-20. Setting the spacing between the cells![]() entire table and press Alt-F3. Word will prompt you to name the entry; you should select something you won't likely type otherwise, such as "_bargraph4x3." Whenever you want to insert a similar bar graph, just type the AutoText entry's name. |