Working with Charts:

Using OpenOffice.org's chart facility

Contents

Overview	ii

Copyright and trademark information	ii

Feedback	ii

Acknowledgments	ii

Modifications and updates	ii

Creating a chart	1

Changing chart data	3

Using editing mode	4

Editing chart data	4

Choosing the best chart type	9

Choosing default colors for charts	15

Overview

This chapter describes how to create line, column, and pie charts to display data, using OOo’s chart facility. You do not need to create the chart in a different application such as OOo Calc and then import it.

Copyright and trademark information

The contents of this Documentation are subject to the Public Documentation License, Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. A copy of the License is available at:
http://www.openoffice.org/licenses/PDL.rtf.

The Initial Writer of the Original Documentation is Vincenzo Ponzi. All Rights Reserved. (Initial Writer contact:vponzi@tiscalinet.it.) Contact the Initial Writer only to report errors in the documentation. For questions regarding how to use the software, subscribe to the Users Mail List and post your question there: http://support.openoffice.org/index.html.)

Contributors: Jean Hollis Weber contributed the section on choosing default colors for charts. Portions created by Jean Hollis Weber are Copyright © 2004. All Rights Reserved. (Contributor contact jeanweber@openoffice.org.)

All trademarks within this guide belong to legitimate owners.

Feedback

Please direct any comments or suggestions about this document to:
authors@user-faq.openoffice.org.

Acknowledgments

Many thanks and congratulations to the developers who provided us with a great product! Thanks to the the community of authors, reviewers and support people for getting the project up and running. This is a great contribution for open software freedom.

Modifications and updates

Version	Date	Description of Change
1.0	31 December 2004	First published edition.

Creating a chart

You can create graphic charts in two ways while using OpenOffice.org:

From the main menu: Insert > Object > Chart...

By clicking on the icon Insert Object on the main toolbar and then clicking on the Create button in the window that appears.

The chart that is inserted in this way is generic, so you need to modify it according to the desired style, and the data you need to show. Figure 1 shows the initial graphic.

Figure 1. Initial inserted graphic chart

Before starting to personalize the data in the chart, you may want to modify its look. To change the border type, color, and thickness, and create a shadow, follow these steps:

Select the graph object.

Right-click on it to show the context menu.

Select Object.

On the Object window (Figure 2), select the Borders tab. In the parameters list, change the border type, color, and thickness. Also select a shadow type and distance.

Figure 2. Changing border parameters

After these changes, the chart will look like the one in Figure 3.

Figure 3. Object toolbar icons

When a chart is selected, the Object toolbar (shown at the top of Figure 3) changes to show the icons that affect the chart. These icons are (from left to right):

Three icons to set the wrap modes.

Three icons to set the horizontal position.

Three icons to set the vertical position.

Three icons to set the border parameters.

One icon to display and modify object properties.

Two icons to change the foreground or background position if the graph overlaps other images.

One icon to change the anchoring of the graph.

Changing chart data

The chart just inserted looks nice, but it is useless because it contains data that has no meaning. You need to change the following parts of the diagram to include real data relevant to the document you’re writing (refer to Figure 4):

Title and subtitle

Legend describing the match between column descriptions and column colors

The table containing the graphic data

Axis descriptions and titles

Diagram type and colors

Figure 4. Properties that can change in a chart

Using editing mode

All the listed objects can be modified in editing mode. To start this mode:

Select the graphic object.

Double-click on the graphic.

The main toolbar changes to show the icons that you can use to change the graphic. The borders of the graphic become gray to indicate that it is in editing mode (refer to Figure 5).

Figure 5. A graphic chart in edit mode

While the graphic is in editing mode, all of the objects can be changed. To exit from editing mode, click outside the chart.

Editing chart data

The following example shows how to proceed. Suppose you want to represent the number of luxury cars sold by an export society in Europe.

The starting point is the graphic shown in Figure 4, so the first thing to do is change the title, subtitle, and axis descriptions. To modify each of these items:

Double-click on the first item, for example the title. The selected item appears surrounded by a dashed border (refer to Figure 6), and the insert cursor flashes inside the dashed rectangle.

Edit the text inside the rectangle.

Repeat this step for all 4 items to enter the following text:

Title = “Luxury cars sold”

Subtitle = “In Europe”

X axis = “Last four years”

Y axis = “Number of cars sold”

The result so far is shown in Figure 6.

Figure 6. Modified chart

Now it is necessary to change the data that will be processed to create the diagram.

There are two ways to change the chart data:

Right-click on the graphic and select Chart Data in the popup window.

Click on the Chart Data icon on the main toolbar shown in Figure 5.

Each of these methods will display the Chart Data window, illustrated in Figure 7. It is essentially a mini spreadsheet, similar to those you can create with Calc, but in the cells you can write only specific data types. In the first row and in the first column you can write only alphanumeric characters. In the remaining cells you can write only numeric values.

Figure 7. Chart Data window

In the top row of the Chart Data window, the icons (from left to right) allow you to:

Insert a row - Insert a column - Delete a row - Delete a column

Switch columns – Switch rows

Sort columns – Sort rows – Sort by columns – Sort by rows.

Apply to chart.

The next step is to change the values and descriptions in the cells. When all the cells are completed, close the window and the chart will reflect the new values.

While the chart is still in edit mode, you can re-position the objects within the chart area. For example, you can scale down the size of the chart or move the legend in the lower right corner.

After these few changes, the chart looks like Figure 8.

Figure 8. Resulting graphic

The chart now represents the required data. However, you may wish to change the colors of the columns. To change the color of a column, double-click on it while the graphic is in editing mode. Figure 9 appears.

Figure 9. Changing the color of a column

In the popup window, select the Area tab and the color you wish. Then click the OK button.

Follow the same procedure for the other columns to personalize the chart. At the end of the changes, the chart will look like Figure 10.

Figure 10. Chart with colored columns

This is quite satisfactory if the document is left in electronic format or if it will be printed with a color printer. But, suppose you need to show the document to a color-blind person or print it in black and white. In these cases, it is better to use another method to distinguish the columns There are several alternatives to colors to fill the areas of a chart column or the slices of a pie chart, these are:

None

Gradient

Hatching

Bitmap

Refer to Figure 11 that shows the Area options. The preferred alternative to colors is perhaps the Hatching option. This option provides several patterns that can be used to fill the chart areas. In Figure 11 this option is used to change the filling of the column chart.

Figure 11. Chart with column filled with hatch

Choosing the best chart type

The example in this chapter refers to a column chart, but you can choose from other chart types. The best type of chart depends on the data you want to present.

For example, to show the percentage of various components in a group, a pie chart is probably the best choice; but to show something like a market trend, a line chart is more adequate.

What follows is a short analysis of the chart types that are usually more adequate to display specific information. However, these are just suggestions that cover the most common diagrams.

Line charts

The main use of line charts is to show some type of trend or variation over time. Here are some examples:

Variation of product prices in a period of time.

Quarterly profits trends.

Trends of stock prices, month by month, during one year.

To insert into a Writer document a line chart showing the revenue and profit of a company during one year, follow these steps:

Click on the Insert Object icon on the main toolbar, and put the graphic in the desired position.

Double-click on the graphic to enter editing mode.

Change text, position, and style of the title and subtitle as needed.

Click on the Chart Type icon on the main toolbar, and select Line, as shown in Figure 12.

Figure 12. Choosing a line chart

Click on the Chart Data icon on the main toolbar, and change the chart by adding a column and deleting two rows, as shown in Figure 13.

Figure 13. Changing chart data

Close the Chart Data dialog and then click on the Data in Rows icon on the main toolbar. This step is required to display Revenue and Profit on Y axis, and quarterly periods on X axis.

Double-click on the lines of the chart to change their color and line type, and show the values, as illustrated in Figure 14.

Figure 14. Modify line properties

The final result is illustrated in Figure 15.

Figure 15. Final result

Pie charts

Pie charts are usually considered the best way to show the percentages or quantities of different components of a group. Here are some examples:

Show percentage of your investments: 40% shares, 10% currency, 30% buildings, 20% gold.

Show the weights of the goods being transported in a ship: 240 tons of tobacco, 543 tons of coffee, 150 tons of cotton.

Show the components of a cake or pie.

Pie chart example:

Insert a generic graphic from the main toolbar.

Double-click on the graphic to enter editing mode.

Change Title, Subtitle and Chart Data to list, in a single column, the weight of the ingredients for a jam pie.

Click the Chart Type icon on the main toolbar, and select Pie in 3D, as shown in Figure 16.

Figure 16. Select 3D Pie chart

Click on Legend On/Off to hide the chart legend.

Double-click on each slice of the pie chart to change the data labels, as shown in Figure 17.

The resulting chart is illustrated in Figure 18.

Figure 17. Data labels

Figure 18. Resulting pie chart

Other chart types

OpenOffice.org provides the following 8 types of chart in 2D: Lines – Areas – Columns – Bar – Pie - XY chart – Net – Stock.

For the first 5 types it is possible to select the 3D option. Most of these types also have variants that affect the display.

Bar and Column charts are similar and you can use them to represent almost the same type of data.

The Area chart is similar to a line chart where the values of the row (or column) are added in a stack. This can be useful when you want to represent a graphic where the single values of items are added, as in the example in Figure 19. In this example the transparency of some areas of the diagram is increased to display the horizontal grid through the diagram.

Figure 19 Example of an area chart

The remaining three types of charts are seldom used.

For the 3D types of charts, you may choose many rendering options, such as rotation, light effects, and so on.

Choosing default colors for charts

To choose default colors for charts:

Click Tools > Options > Chart > Default Colors.

Select a data series from the Chart colors list, then click on one of the colors in the Color table.

Repeat for other data series as required.

Figure 20. Choosing default colors for charts

Choosing default colors for charts

Working with Charts	15

Title:	Working with Charts: Using OpenOffice.org's chart facility
Version:	1.0
First edition:	December 2004
First English edition:	December 2004

Overview

Working with Charts	xv

Working with Charts

Jean Hollis Weber

2005-01-01T05:44:48