Getting Ready: Working With Pie Charts
Getting Ready: Working With Pie Charts
a line chart).
When you convert an existing chart to a new chart type, IBM Cognos Report Studio keeps the
properties from the existing chart if those properties exist in the new chart type. For example,
if you convert a pie chart to a bar chart, Report Studio maps your chart palette to the new
chart, but does not map the exploding slices because the exploding slices property does not
exist in a bar chart.
Getting ready
In this recipe we will use the column chart we created in the last recipe. So if it is not open,
navigate in Cognos to the report created in the last recipe and open it in Report Studio.
How to do it...
In this recipe we will convert the column chart in our report to a bar chart. To do this, perform
the following steps:
1. In IBM Cognos Report Studio, open the report created in the previous recipe.
2. Now, click on the Chart object that we created to select it.
Charts and New Chart Features
266
3. Right-click on the Chart object and then click on Convert Chart.
4. The Convert Chart screen appears.
5. Select the Clustered Cylinder Bar with 3-D Effects chart and then click on OK.
Chapter 11
267
6. We want to change the measure used in the chart from revenue to gross profit. From
Sales fact, drag Gross profit onto Default measure (x-axis): to replace Revenue.
7. We want to add a reference to the values of Gross profit. This reference will be on
25 percent of the scale.
8. In the Properties pane, locate the Numeric Baseline property and click on it.
9. In the Baseline screen, create a new baseline based on Percent along axis.
10. Enter 25 as the required percentage and then click on OK.
11. Finally, we want to change the width of the chart. In the Properties pane, locate the
Size and Overflow property and click on it.
12. Clear the defined width, 800 px, and then click on OK.
Charts and New Chart Features
268
13. Run the report to test it.
How it works...
We saw in this recipe how easy it is to convert from one chart type to another type.
While converting a chart to another type, Report Studio will keep the data used in the first
charts as well as the properties and formatting option like palettes. The only concern here
is that the second type, which we converted to, has to have these properties.
So here in our example, the new bar chart was created with the same data items used in the
original column chart. We changed the measure for the chart to be Gross profit.
It is sometimes useful to have references in the chart that represent something meaningful
to your data or your business. That's why you will need to use the baseline property.
Baselines are horizontal or vertical lines that cut through the chart to indicate
major divisions in the data.
For example, you can add a baseline to show a sales quota or break-even
point. Each baseline represents a value on an axis. By default, the baseline
and its label appear in the legend.
Working with pie charts
Pie charts are useful for highlighting proportions. They use segments of a circle to show the
relationship of parts to the whole. To highlight actual values, use another chart type such as
a stacked chart.
Chapter 11
269
Pie charts plot a single data series. If you need to plot multiple data series, use a 100 percent
stacked chart. Reports in PDF or HTML format show a maximum of 16 pies or gauges per chart.
In this recipe, we will examine the pie chart and have a look at some of the new features
available in IBM Cognos Report Studio 10.
Getting ready
For this recipe, we will use the GO Data Warehouse (query) package.
How to do it...
In this recipe we will create a new pie chart and will check some of its properties. To do this,
perform the following steps:
1. Open IBM Cognos Report Studio and select the GO Data Warehouse (query) package.
2. In the New pop-up screen, select Chart and then click on OK.
3. Another pop-up screen named Insert Chart appears. Select the Exploded Pie with
3-D Effects and Rounded Bevel chart and then click on OK.
Charts and New Chart Features
270
4. In the Source tab, open the Products dimension in Sales (query). Drag-and-drop
Product line to Series (pie slices):.
5. From Sales fact, drag Revenue to Default measure:.
6. At this stage, run the report to test it.
7. Now, go to the Properties pane and locate the First Slice Angle property. By default,
the value is 90. Change it to 60 and then click on OK.
8. Locate the Exploded Slices property. Make sure the value is Slice 1 exploded 50.
9. Go to the Summarize Small Slices property and click on it. The Summarize Small
Slices screen appears.
Chapter 11
271
10. Check the Summarize slices smaller than a value checkbox. Enter 5 as Percentage
values and then click on OK.
11. Run the report to test it.