Outils pour utilisateurs

Outils du site


issue60:tuto_libreoffice

Ceci est une ancienne révision du document !


While data collection is useful and helpful in determining results, or whether goals were met, charts and graphs simplify data so others can quickly digest and interpret results. The art of charts and graphs is well beyond the scope of this article, but I will show you how to create a chart in Calc, which you could use in Writer or Impress. There are many predefined charts and graphs available in Calc.

We will use a simple collection of data to create our chart. The data represents the boat rentals for a six month period. We will use a bar chart to show the relationship between the different types of boat rentals for each month.

The Chart Wizard

The chart wizard allows us to get the basics of our chart completed quickly and easily. In fact, sometimes the chart wizard is all you will need to complete your chart. The wizard is your jumping off point for all chart creation. Before starting the wizard, you need to highlight the data used for the chart. You will want to make sure you just highlight the data and their labels. Although you can modify the ranges for the data series later, getting it as close as possible helps Calc to better render the final results.

You have two ways to start the chart wizard. You can click on the chart wizard icon (shown right) on the main toolbar, or through the menu with Insert > Chart. The chart wizard consist of four steps. We will walk through each of the steps, but it is possible to click the Finish button at any time to end the wizard process.

1. Chart Type

The chart type (above) is where you select the type of chart you want to create. For some chart types, you have the option of 3D effects, and for others you do not. For our chart, we will select the basic bar chart. Since we have the option of 3D effects for a bar chart, we will also check the 3D Look checkbox. In the 3D Look dropdown box, you have the options of Realistic or Simple. This helps determine the look and shading of the 3D effect. We will use Realistic. Finally, you can select different shapes for your data series. We will use cylinder. Click the Next button to move to the next step.

2. Data Range

In step two we define the data range and how Calc will use the data range to create the chart. If we need to change the range from what we selected, we can type in the range or select the range from the spreadsheet. The small button at the end of the data range textbox will shrink the wizard dialog so more of your spreadsheet is visible.

We need to tell Calc whether our data series are defined by row or column. For our example, we used columns. Also, since we selected the labels as well as the data, we need to check both First row as label and First column as label.

Click the Next button to move to the next step.

3. Data Series

The third step (below) lets us redefine, add, change the order, and remove data from our data series. You will see the data series for the chart defined by their label in a listbox. You can change the range of the series much as you could in the data range step; however, keep in mind, this is only for one set of data and not the entire chart. You can add another series by clicking on the Add button. You can remove a series by selecting it and clicking the Remove button. Change the order of the series by selecting the series you want to move and use the up and down arrow buttons.

We don’t need to change anything here, so click the Next button to move to the last step of the wizard.

4. Chart Elements

The fourth step (above right) of the wizard allows us to define names for the different parts of our chart, including title, subtitle, and x and y axis. We can also set the location of our legend and the grid for the chart area. For our chart sample, give it the title “Sample Bar Chart”. We also want to label our Y-Axis as “Num of Rentals”. Since our X-Axis is the months of the year, we don’t really need a label for the X-Axis. It is self-explanatory. Set the legend to appear at the bottom, giving our data more room to spread out.

We are now finished with the Chart Wizard. If you ever need to revisit any of the steps, you can use the Back button or select the step from the list on the left. Click the Finish button to complete the wizard and display the chart in your spreadsheet.

Formatting Chart Elements

After creating the chart with the Chart Wizard, it is possible to change the elements of the chart. After clicking on finish, you will notice that the newly created chart is selected and your toolbar has changed. You have the chart formatting toolbar instead of the standard edit toolbar. The new toolbar has a dropdown box which allows you to select the different elements you can change. After selecting an element from the dropdown, click on the Format Selection button to display the dialog for that element.

There are also buttons for changing the chart type, and displaying the chart grid and legend. The button with the double arrow beside the capitol A is used to scale the text with the chart when you resize it. I highly recommend this, as it keeps things proportional. In addition to the changes in the toolbar, you will find changes in the Insert and Format menus as well. These changes allow you to insert and format elements of your chart.

You can move the chart by clicking and dragging the borders. Resize the chart by clicking and dragging one of the eight handles. If you selected the text scale button, the size of the text will scale with the chart as you change it.

Now, let’s make some changes to our chart. In the dropdown list in the toolbar, select Chart Title and click on the Format Selection button. On the Font tab, change the size to 18 and the style to bold. Click OK. Next, select Chart Area and click Format Selection. The chart area is the entire background of the chart. On the Area tab, select a background color of light gray. You will notice this changes the color of our data area as well, but we want the data area to stand out. Select Chart from the dropdown list and click Format Selection. On the Area tab, select to fill with color and pick white. Since we are using a 3D chart, let’s change the perspective a little: Format > 3D, check the Perspective checkbox and change the percentage to 50%. You will see this changes the perspective of the chart.

There are other things to do on your own. Try changing the color of one of the data series or adjusting the placement of some of the elements. All can be done through the dropdown list, and the Format and Insert menus. When you deselect the chart, you are taken back to normal toolbars and menus. To edit the chart later, just double-click the chart, and you get the specialized toolbar and menus back.

We have only touched the surface of the chart and graphs in Calc, but I encourage you to play around with the different types and elements. The type of chart you use is dependant upon the type of data you have and the information you want to convey.

Next time, we will begin our work in Impress, LibreOffice’s presentation program.

issue60/tuto_libreoffice.1336017473.txt.gz · Dernière modification : 2012/05/03 05:57 de fredphil91