Adding a line chart to your dashboard

A line chart is very useful to visualize data that changes over time. It consists of a set of data points that are connected by a line. The horizontal x-axis typically shows the categories in which the data is divided. The vertical y-axis shows us the values.

This recipe shows how to add a line chart to a dashboard and how to link it to the data in the spreadsheet. We will also discuss the components that are similar to the line chart component: bar chart, column chart, area chart, stacked chart, and the Marimekko chart.

Getting ready

Open a new file in SAP BusinessObjects Dashboards and enter the data into the spreadsheet, as shown in the following screenshot:

Getting ready

Note

You can also click on the Line Chart component in the Components browser, move your cursor to the canvas area (the arrow will now change into a cross), and click again. You can use whatever method you prefer.

How to do it...

  1. Drag a Line Chart component from the Components browser into the canvas:
    How to do it...
  2. Select the Line Chart component you just added to the canvas by clicking on it. Now, the component is surrounded by eight blocks that enable you to adjust the size of the component.
  3. The properties pane for this component is also visible now. By default, the General tab is selected. In the Data section we can bind the data we entered earlier in the spreadsheet to this component. Click on the button on the right-hand side of the By Range field:
    How to do it...

    Tip

    If the properties pane isn't present on your screen, you can activate it from the menu under View | Properties. You can also right-click the component and select Properties.

  4. In the spreadsheet, select the range from A4 to E7 and click on OK. The data is now bound to the component:
    How to do it...
  5. The Data section of the properties pane now looks like what is shown in the following screenshot. The chart will show the data series we just bound.
    How to do it...
  6. In the same way, we can add titles to this chart. Select spreadsheet cell A1 and enter Sales data; also, enter 2011 in cell A2.
  7. Bind the Chart field in the properties pane with spreadsheet cell A1 and bind the Subtitle field with cell A2.

    Tip

    You can also enter a value in these title fields directly.

  8. In the Category (Y) Axis field, enter Tonne.
  9. Your setup should now look like what is shown in the following screenshot. Click on the Preview button to try the dashboard.
    How to do it...

How it works...

The preceding section showed how to connect data in one or more spreadsheet cells to the Line Chart component through several options in its properties pane. This is how we bind data and you will be using this a lot during the development of dashboards with SAP BusinessObjects Dashboards.

There's more...

In this section we will discuss manually binding data to charts and how to hide and show data series in a chart. We will also go through some other chart components that work in a similar way to the Line Chart component.

Manually binding data

In this recipe, we used a pretty straightforward dataset with the category labels in the first row (Q1, Q2, Q3, and Q4) and the series names in the first column (Apple, Banana, and Cherry). SAP BusinessObjects Dashboards is able to understand this dataset and bind this information automatically. However, this may not always be the case, and therefore, not always lead to the visualization you had in mind.

To change the direction of the visualization of the spreadsheet data in the chart, you can select the Data in Columns option in the Data section of the properties pane. This will switch the series and the labels.

By clicking on By Series in the Data section of the properties pane, it is possible to manually adjust all binding settings for the name and values of each series. Additionally, you can select the axis a series should be plotted on (primary or secondary). You can change the series order by using the two arrow buttons and add or remove series by using the + and - buttons. Also, you can manually bind the category labels to a range of cells shown in the following screenshot:

Manually binding data

Hide/show series

Series in a chart can be hidden or shown by the user when using the dashboard by following these steps:

  1. Go to the Appearance tab and select the sub-tab Layout.
  2. Make sure that Enable Legend is selected.
  3. Select Enable Hide/Show Chart Series at Run-Time.
  4. Set Interaction to Check Box.
  5. Click on the Preview button to try this feature.
    Hide/show series

Other charts

In the following sections, several other chart types will be introduced. These charts work roughly in the same way as the line chart component.

Bar chart and column chart

The bar chart and column chart components can be configured in exactly the same way as a Line Chart component. A bar chart presents values in horizontal bars while the column chart uses vertical bars. These types of charts are typically not used to present data over a long time period, but to show data from different categories that need to be compared. The following screenshot shows the bar chart and column chart representation:

Bar chart and column chart

Area chart

The area chart component is a line chart with a filled area beneath the line. Another difference between these two types of charts is that in an area chart, the first value (Q1) is plotted on the far left-hand side and the last value (Q4) on the far right-hand side of the chart. An area chart is used to visualize the cumulated total value of the series over a period of time. This component can be configured in the same way as the line chart component. The following screenshot displays an area chart:

Area chart

Stacked charts

The bar chart, column chart, and area chart components all have a stacked versions: stacked bar chart, stacked column chart, and stacked area chart. These stacked chart components show the values of the series on top of each other in the same column. You can use stacked charts if the dashboard user wants to compare totals, as shown in the following screenshot:

Stacked charts

Marimekko chart

The Marimekko chart is a special type of stacked chart. Instead of displaying absolute values, the bars now have the same height and the segments of each bar represent a percentage of the total. The same principle counts for the width of each bar. The following screenshot displays a Marimekko chart:

Marimekko chart

The setup of the Marimekko chart component is similar to the other stacked chart components, with only one addition. In the Data section of the General tab of the properties pane, we will now find the option to bind category values, which will determine the width of the bars as seen in the following screenshot:

Marimekko chart
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset