Modifying charts ================ About charts ------------ A chart is a graphical representation of data in a report. You use charts to display complex data in a format that is easily understood. A report can contain a chart that functions as a report itself, or it can combine a chart with other report elements to highlight relevant information. This section provides an overview of the different types of charts you can modify using Interactive Viewer, and explains how you can filter chart data, change chart subtypes, and format charts in a report. A chart displays data as one or more sets of points. Charts are particularly useful for summarizing numeric data and showing the relationship between sets of values called series. The two types of series are category series and value series, typically denoted by the x- and y-axis. For example, a chart can show sales by region, average temperatures by month, or the price of a stock over three months. Types of charts --------------- Specific types of data are best depicted with a specific type of chart. This section describes the common types of charts you can modify in Interactive Viewer. About bar charts ~~~~~~~~~~~~~~~~ A bar chart typically displays data values as a set of vertical bars, but you can transpose the axis to display horizontal bars. When you view report data in a chart with vertical bars, you can easily compare the values. A bar chart is useful to show data changes from one time period to another, for example from one year, or quarter to another, or to illustrate comparisons among items. Standard bar charts are side-by-side but you can have stacked and percent stacked bar charts that also show the relationship of individual items to a whole. **Side-by-side bar chart** Side-by-side bar charts show bars from each series, one beside the other. Each of these bars have the same width. The width depends on the number of series being plotted. *Figure 8-1* shows a side-by-side bar chart that graphically presents a company's sales figures by geographical region. .. image:: images/figure_81.png *Figure 8-1 Side-by-side bar chart* **Stacked bar chart** Stacked bar charts show bars stacked one above the other. The stacked bar chart shows totals for each series as well as the proportion that each series contributes to the grand total. The example in *Figure 8-2* shows the company's sales figures for the current year and previous year, in the form of a stacked bar chart. .. image:: images/figure_82.png *Figure 8-2 Stacked bar chart* **Percent stacked bar chart** In a percent stacked bar chart, multiple series are stacked vertically and the values appear as a percentage of the whole. The example in *Figure 8-3* shows the company's sales figures by geographical location in terms of a percentage of the whole. *Figure 8-3* displays the sales values in percentages instead of the actual numbers shown in the previous bar charts. The percent stacked bar chart is meaningful only when you need to display and compare multiple series. Do not use this chart subtype if you are displaying only one series, for example, only sales for Australia. .. image:: images/figure_83.png *Figure 8-3 Percent stacked bar chart* About tube, cone, and pyramid charts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tube, cone, and pyramid charts are variations of the bar chart that use tubular, conical, and pyramid-shaped risers in place of bars. You use a bar, tube, cone, or pyramid chart when.you want to display data values as a set of vertical or horizontal columns. You can use Interactive Viewer to modify the subtype of tube, cone and pyramid charts to side-by-side, stacked, or percent stacked type depending on which type best represents the data being used. You can also specify formatting options for the chart, as described later in this document. The example chart shown in *Figure 8-4*, *Figure 8-5*, and *Figure 8-6* uses the same data, sales of a product line across quarters, to illustrate these different chart types. .. image:: images/figure_84.png *Figure 8-4 A tube chart showing sales by quarter* .. image:: images/figure_85.png *Figure 8-5 A cone chart showing sales by quarter* .. image:: images/figure_86.png *Figure 8-6 A pyramid chart showing sales by quarter* About area charts ~~~~~~~~~~~~~~~~~ An area chart displays data values as a set of points connected by a line, with the area shaded below the line. You use an area chart to present data that occurs over a continuous period of time. For example, you can use an area chart to view the percentage of orders and the corresponding unit volume for trains, ships, and planes over three months. **Stacked area chart** A stacked area chart consists of multiple series stacked vertically, as shown in *Figure 8-7*. The example shows that the stacked area chart is suitable for the data because the chart displays totals for all series as well as the proportion that each series contributes to the total. The height of the top line shows the total value for each category, for each quarter in this example. Each shaded area represents the sales amount for a specific region. .. image:: images/figure_87.png *Figure 8-7 Area chart* **Overlay area chart** Overlay area charts show areas from each series independent of each other. The areas appear by joining the values for the series. In an overlay area chart, the areas of multiple series overlap, as shown in *Figure 8-8*. As the example shows, this chart subtype is not suitable for showing multiple series if the data values overlap. Use an overlay area chart if you want to show only one series, for example, only sales for Asia. .. image:: images/figure_88.png *Figure 8-8 Overlay area chart* **Percent stacked area chart** In a percent stacked area chart, multiple series are stacked vertically and the values appear as a percentage of the total. *Figure 8-9* shows the sales values in percentages instead of the actual numbers as shown in the previous area charts. The percent stacked area chart is meaningful only when displaying and comparing multiple series. If displaying only one series, the percent stacked area chart appears as in the example shown in *Figure 8-10*. The sales percentage of one region compared to the whole is 100%. .. image:: images/figure_89.png *Figure 8-9 Percent stacked area chart showing sales figures* .. image:: images/figure_810.png *Figure 8-10 Percentage stacked area chart for a single series* About line charts ~~~~~~~~~~~~~~~~~ A line chart displays data values as a set of points connected by a line. You typically use line charts to present large amounts of data that occur over a continuous period of time. A line chart is the most basic type of chart in finance. *Figure 8-11* shows an example of a line chart, displaying the value of the Euro against the US Dollar over 10 days. .. image:: images/figure_811.png *Figure 8-11 Line chart displaying currency exchange rates* A line chart is similar to an area chart, except that it does not fill in the area below the line, and it uses a square to mark each data value. There are three subtypes of line charts. **Overlay line chart** In an overlay line chart, multiple series appear as overlapping lines, as shown in *Figure 8-12*. The squares mark each data value. Overlay line charts show lines from each series independent of the others. The lines appear joining the values for the series. .. image:: images/figure_812.png *Figure 8-12 Overlay line chart showing sales by quarter across regions* **Stacked line chart** In a stacked line chart, multiple series are stacked vertically, as shown in *Figure 8-13*. The stacked line chart shows totals for each series as well as the proportion that each series contributes to the grand total. In the example, the top line shows the total sales amounts for each quarter. The empty area between each line represents the sales amount for a region. .. image:: images/figure_813.png *Figure 8-13 Stacked line chart* The stacked line chart is not as effective as the stacked area chart for comparing the amount that each region series contributes to the total because the areas are not shaded. In a stacked area chart, the shaded areas provide a clear visual cue that each part is compared to the whole. In addition, as the example shows, a user can easily misinterpret the data in a stacked line chart. There is no obvious indication that the top line shows the total sales amount for each quarter and that the middle line shows the difference in the sales amount between Europe and Asia. A user viewing this chart can misinterpret the top line to represent the sales data for the U.S., the middle line to represent the sales data for Europe, and the bottom line to represent the sales data for Asia. **Percent stacked line chart** A percent stacked line chart consists of multiple series stacked vertically and the values shown as a percentage of the whole. As shown in *Figure 8-14*, the sales values appear as percentages instead of numbers. Like the percent stacked area chart, the percent stacked line chart makes sense only when displaying and comparing multiple series. Do not use this chart subtype if you are displaying only one series, for example, only sales for Europe. Like the stacked line chart, the percent stacked line chart is not as effective as the percent stacked area chart. .. image:: images/figure_814.png *Figure 8-14 Percent stacked line chart* About pie charts ~~~~~~~~~~~~~~~~ Pie charts show values as slices of a pie. The size of each slice is proportional to the value it represents. You plot pie charts for multiple series as multiple pies, one for each series. You use a pie chart to show the relationship of parts to the whole. For example, *Figure 8-15* shows the contribution of each state to the total sales of a product. .. image:: images/figure_815.png *Figure 8-15 Pie chart* About meter charts ~~~~~~~~~~~~~~~~~~ A meter chart is very effective when showing a small number of values in a prominent manner. A meter chart displays a value as a needle pointer on a circular or semicircular dial. You can use a meter chart to create a gauge or dashboard display. As Figure 8-16 shows, a meter chart resembles a speedometer, with tick marks and numbers, showing a range of values. In this example, the meter chart displays two pointers that represent two values, projected sales total and actual sales total. You can show multiple dials in a chart, or one dial with multiple needles, by using a superimposed meter chart. For example, you can use one needle to show interior temperature, and another to show exterior temperature. .. image:: images/figure_816.png *Figure 8-16 Meter chart showing projected sales and actual sales* **Standard meter chart** A standard meter chart displays multiple values in multiple dials, where each dial displays a single value. The meter chart shown in *Figure 8-17* displays the same data as the chart in *Figure 8-16*, by using two dials instead of a single dial. .. image:: images/figure_817.png *Figure 8-17 Standard meter chart* **Superimposed meter chart** A superimposed meter chart displays multiple values in a single dial, as shown in *Figure 8-16*. The dials overlap each other so that the chart can represent multiple needles within a single region. About stock charts ~~~~~~~~~~~~~~~~~~ A stock chart shows data as points on a time continuum, such as days of the week. Stock values appear as a candlestick, a box with lines extending up and down from the ends. Open and close values mark the upper and lower edges of the box. High and low values mark the upper and lower points of the line. Although a stock chart typically displays stock price data, you can also use a stock chart to show scientific data, such as temperature changes over time. **Candlestick stock chart** Candlestick stock charts contain boxes with lines extending up and down from the ends. The upper and lower edges are the open and close values of the stock. The upper and lower points of the line are the high and low values of the stock, as shown in Figure 8-18. The top and bottom of each box indicate the open and close values. If the close value is higher than the open value, the box is white. If the open value is higher than the close value, the box is shaded. This style immediately provides information about whether a stock posted a gain or a loss for a given day. .. image:: images/figure_818.png *Figure 8-18 Candlestick stock chart* *Figure 8-19* displays the data used for the stock charts shown in *Figure 8-18* and *Figure 8-20*. .. image:: images/figure_819.png *Figure 8-19 Stock chart data* **Bar stick stock chart** Bar stick stock charts consist of a vertical line with two horizontal lines called ticks attached to it. The upper and lower points of the vertical line are the stock open and close values. The ticks are the high and low values, as shown in *Figure 8-20*. .. image:: images/figure_820.png *Figure 8-20 Bar stick stock chart* The chart in Figure 8-18 shows that the stock posted a gain on the fourth and sixth day in the trading week and a loss on the other five days. The example in *Figure 8-20* shows a stock with moderate fluctuation. When the stock is volatile on a given day, the two horizontal lines can appear far above or below the vertical line. As you can see from the examples, the candlestick stock chart shows the gain or loss pattern more clearly than the bar stick stock chart. About scatter charts ~~~~~~~~~~~~~~~~~~~~ A scatter chart presents data as x-y coordinates by combining two sets of numeric values into single data points. A scatter chart typically displays scientific and statistical data, because it shows if there is a relationship between two sets of measurements. Use a scatter chart to compare, for example, salaries and years of experience, weight and body fat, rainfall amounts and pollen levels, or test scores and hours of study. The greater the number of data values you include in a scatter chart, the clearer are the trends the data reveals. A scatter chart shows data as points. Scatter charts display values on both axes. For example, the chart in *Figure 8-21* shows the relationship between salary and years of experience. Each pair of values, salary and years of experience, is plotted as a single x-y value. The chart reveals a positive, or direct, relationship between salary and years of experience. As the number of years increases, the salary also increases. The chart also displays the salaries earned by men and women. In this example, the chart reveals that men consistently earn more than women. .. image:: images/figure_821.png *Figure 8-21 A scatter chart displaying the average salaries by years of experience* About bubble charts ~~~~~~~~~~~~~~~~~~~ A bubble chart resembles a scatter chart, but uses bubbles instead of data points. You choose a bubble chart instead of a scatter chart if you have three values per data point. For example, *Figure 8-22* shows a bubble chart that plots the retail against the wholesale prices of products, calculates the discount, and uses the size of the bubbles to show the amount of the discount. The color-coding of the bubble identifies the product type. Bubble charts typically describe financial data. Use a bubble chart when you want to represent data using more than two values. .. image:: images/figure_822.png *Figure 8-22 Displaying discount percentage for product types* About difference charts ~~~~~~~~~~~~~~~~~~~~~~~ A difference chart typically shows variation between two sets of data by shading the areas between points of comparison. You use a difference chart when you want to use shading and multiple graphs to accentuate the deviation between data variables. The chart shown in *Figure 8-23* displays the lead time between the shipped date and the required date from the order date. .. image:: images/figure_823.png *Figure 8-23 A difference chart displaying the time taken to ship orders* Modifying charts in Interactive Viewer -------------------------------------- The basic characteristics of a chart are determined in the report design. You can modify the chart in Interactive Viewer in the following ways: * Change the chart subtype. * Filter data. * Format the chart. To choose any of these options, select the chart to highlight it, then right-click the chart area to display the context menu containing these options. Changing chart subtype ~~~~~~~~~~~~~~~~~~~~~~ Area charts, bar charts, cone charts, line charts, pyramid charts, and tube charts have a stacked subtype and a percent stacked subtype. In a stacked chart, the data points from one value series are arranged on top of the data points of another series. You can choose the percent stacked subtype to show the contribution of individual items to the whole. If a type of chart offers subtypes, you can change the subtype in Interactive Viewer. Many chart types offer two-dimensional subtypes, in which the chart shape appears flat against the chart background. You can also display some charts in two dimensions with depth, or three dimensions. A chart with depth appears to have added dimension. **How to modify the chart subtype** 1. Select the chart to highlight it. From the context menu choose *Change Subtype*. 2. On *Chart Subtype* choose an option from the available subtypes. Choose OK to apply your selection. Filtering chart data ~~~~~~~~~~~~~~~~~~~~ You can filter chart data in the same way that you apply filters to data in any report column. In a chart you can filter data on the x-axis or the y-axis. Select the chart, then choose *Filter* from the context menu. *Chart Filter* appears, as shown in *Figure 8-24*. Complete the steps to apply filters that define what data is displayed on the axes of the chart. .. image:: images/figure_824.png *Figure 8-24 Creating a filter condition for a chart* You can set limitations on the data that the chart displays by applying a filter in the same way that you would for any report column. You can also change an existing filter condition or add conditions by choosing *Advanced Filter* from *Chart Filter*, as shown in *Figure 8-25*. .. image:: images/figure_825.png *Figure 8-25 Adding and modifying a filter condition for charts* Formatting the chart ~~~~~~~~~~~~~~~~~~~~ Charts include many different visual elements, as shown in *Figure 8-26*. You can customize the appearance of many of these elements using Interactive Viewer. To clarify the presentation of data, or to create a more pleasing composition, you can rearrange the layout of the chart. Some of the formatting for a chart, such as the colors of the bars in a bar chart and the background color of the chart, are defined in the original report, and cannot be modified. When viewing the report you can modify the fonts and font sizes of the chart title and axis labels, and the height and width of the chart. You can hide axis labels, place labels at an angle relative to the axis, and hide the legend or determine where to display the legend in relation to the chart. Depending on the type of chart you are working with, you can also transpose the axes in some cases. *Figure 8-26* displays the elements of a basic bar chart that you can format using Interactive Viewer. In this example, the category series consists of a set of regions, and the value series consists of a set of sales figure values. .. image:: images/figure_826.png *Figure 8-26 Elements of a chart* As mentioned in an earlier section, a chart organizes data points into value sets called series. Series can be of two types.a category series and a value series. The category series typically determines what text, numbers, or dates you see on the x-axis. The value series typically determines the text, numbers, or dates on the y-axis. A value axis positions data relative to the axis marks. The value of a data point determines where it appears on a value axis. You do not plot text on a value axis. In most charts with axes, the x-axis is the category axis, and the y-axis is a value axis. The plotting options available for the x- and y-axes can differ in name and function, depending on the chart type. For example, when you modify a meter chart, which has no axes, you define the position of a needle on the dial instead of defining the y-axis. When you modify a pie chart, you define the size of the slices instead of the y-axis. Using Interactive Viewer, you can change the titles of the axes, modify the scale of the y-axis, and modify the labels on the x-axis, by changing the way the values are displayed, and the existing interval. The following section describes how to perform each of these tasks. **Formatting the legend, title, and size of a chart** When you modify a chart, you can add a legend title, choose to display or hide the legend on the chart, and determine the legend position. You can modify the font, size, color, and style of the legend and in some cases legend items. You can also choose to display or hide the chart title and modify the appearance of the title text in the usual ways, by changing its font properties. In addition, you can modify the chart's size and the display dimension of a chart. How to change the title of a chart 1. Select the chart, and choose *Format Chart* from the context menu. 2. On *Format Chart*, shown in *Figure 8-27*, in *Chart*, in *Title*, you can type a title for the chart, or select *Auto* to enable Interactive Viewer to specify a title. To specify font properties, select *Title Font*. On *Font*, specify the font, size, color, background color, and style. You can *Preview* your selection in the next field. Choose OK. **How to change the size of a chart** On *Format Chart*, in the *Chart area*, type the new values in the *Width* and *Height* fields, then choose a unit of measurement from the next drop-down list. The example shown in *Figure 8-27* uses the unit of measurement, inches. .. image:: images/figure_827.png *Figure 8-27 Formatting a chart* **How to modify the dimension of a chart** Choose a dimension for the chart from the *Dimension* list*. You can choose one of the following: * 2D * 2D with depth * 3D You can select two-dimensional subtypes for all charts. Choosing 2D displays the chart flat against the chart background. When you choose the 2D dimension for a column or bar chart, Interactive Viewer highlights the *Use Glass Style* field by default. This option displays the chart with rounded edges in a column or bar chart. Deselect this option to display a column or bar chart with sharp edges. Choosing 3D displays the chart against an additional axis to the existing x- and y-axes, providing greater depth. Choosing 2D with depth, also gives the chart an appearance of depth. *Figure 8-28* shows an example of a bar chart with a dimension setting of 3D on the left, and the same bar chart using a dimension setting of 2D with depth, on the right. Three-dimensional charts show how an object on the z-axis changes according to the x- and y-axes. The bar chart with two-dimensional depth setting gives the appearance of a three-dimensional object, but is arranged on the x- and y-axes only. .. image:: images/figure_828.png *Figure 8-28 Comparing charts with 3D and 2D with depth settings* **How to interchange the axes of a chart** To interchange the x- and y-axes of a chart, select *Flip Axis* in the *Chart area* on *Format Chart*. You can flip the axes for some chart types. If this feature is available for the chart type you are using, the *Flip Axis* box is visible. **How to format the legend of a chart** 1. On *Format Chart*, select *Show Legend* to display a legend for the chart. If you do not select this box, the legend does not appear on the chart. In *Position*, select an option from the list to place the legend above, below, to the right, left, or inside the chart. 2. Type a title for the legend. If you leave this field blank, no legend title appears on the chart. In some cases, you can also specify font properties for the legend title and each legend item. **Formatting the x- and y-axes of a chart** You can use Interactive Viewer to modify axes titles of a chart, and the axis labels. You can also delete axis titles, and suppress labels. *Figure 8-29* shows an example of the *Format Chart* dialog box. **Changing the axis titles** Charts other than pie charts and meter charts can have x-axis and y-axis titles. To add and format an axis title, using *Format Chart*, you can hide tan axis title, or modify an existing title. On *Format Chart*, in the y-axis section, type a title in the Title field. Then modify the font properties by choosing *Title Font*. **Changing the axis labels of a chart** A chart displays axis labels by default, to the left of the vertical axis, and below a horizontal axis. Using Interactive Viewer, you can specify whether to hide or display labels, and modify the position and appearance of labels so that they are easier to read. For example, you can rotate or stagger the labels on the x-axis so that they are easier to fit on the chart and read. You can also modify the label font by selecting Label Font and setting new font properties. .. image:: images/figure_829.png *Figure 8-29 Formatting the axes* Sometimes a chart displays so many values on an axis that the label text overlaps and is not legible. You can rotate the labels at an angle relative to the axis or stagger the labels, so that they do not overlap, as shown in *Figure 8-30*. For example, you can show data points for every third month, every ten days, every other year, and so on. To change the label properties, navigate to *Format Chart* and specify the values in the *Category (X)* axis title area. **How to modify the axes labels of a chart** On *Format Chart*, complete the following steps: 1. You can specify the title of value or y-axis for a chart. You can also specify the title for an additional y-axis, if the chart contains more than one. 2. To display labels, select *Show labels*. To hide labels, deselect *Show Labels*. 3. To rotate the labels, specify a degree of rotation in the *Labels Angle* field. 4. To stagger labels, select *Stagger Labels*. 5. If label names are too long, or if the chart looks too crowded when you display all the labels, you can use Interactive Viewer to specify which labels to skip so that only the other labels appear on the chart. To skip labels, set the *Interval value* at which labels should appear. For example, to show every other label, use an *Interval value* of 2. To show every fifth label, use an *Interval value* of 5, and so on.You can also modify the font properties for labels by choosing *Label Font*. The example in *Figure 8-30* shows a chart on the left with staggered labels, and one on the right with rotated labels. .. image:: images/figure_830.png *Figure 8-30 Staggered labels and rotated labels* **Modifying scale** You can modify the scale of the value axis using Interactive Viewer to fit the data that the axis displays. Category axes do not support scale changes. The scale determines the range of values on a linear, logarithmic, or date-and-time axis. You can use the axis scale to change the following settings: * Minimum and maximum values for an axis * Step interval. Step Interval is the interval between each value on the value axis or the distance between major grid marks. o set the scale of the y-axis, on *Format Chart* type values for minimum, maximum, and step interval in the *Value (Y)* axis area. The chart on the left in *Figure 8-30* uses a scale between 0 and 240000 and a step value of 40000.