DB2 graphic  QMF Version 8

Modifying axes in chart layouts

Axes provide the graphing capabilities for chart layouts. You can create standard charts with a single x-axis and a single y-axis or, as in stock charts, you can create more sophisticated graphs with multiple axes in one dimension.

Most chart layouts create the required axes by default. For example, when you create a scatter chart using the Layout wizard, the layout contains two axes: ScatterChart.XAxis and ScatterChart.YAxis, as shown below.

Figure 16. Axes of a Scatter chart

Modifying the axis range

You can modify an axis range to change the way your layout appears.

Typically, you use the default AutoScaleUpper and AutoScaleLower properties to set your upper and lower axes limits. However, if you want to refine or limit the data shown in the chart, you can manually set the axis limits.

Note: In general, your data display will be most accurate and usable for other types of displays if you specify your ranges in the query supplying the layout, rather than in the chart's upper and lower limits.

Modifying the axis interval labels

You can also modify the label intervals and minor ticks on the axis.

To manually specify the label and tick intervals, you must first specify a real value for the label interval based on the data returned by your query.

For example, if you have numerical data between 10,000 and 150,000, you must specify label intervals that correspond with this range of data. Thus, a label interval of 10,000 would be logical. After you specify an appropriate label interval, you can then change your IntervalSettings property to Fixed.

Adding an axis

Adding an axis to a chart is similar to adding a layer to a layout; it enhances the analysis of your data. You can add axes to any chart that uses axes to graph data points: for example, timeline charts, stock charts, and scatter charts.

Note: Column charts and bar charts allow you to graph multiple values along the y-axis without adding any additional y-axes. They generate multiple bars to represent the multiple values.

Typically, when you have two axes representing two data ranges, you can display a single correlation. For example, you might want to correlate sales volume with time of year, location, advertising spending, or some customer demographic.

By adding another numerical axis to a graph that contains a single date/time axis and a single numerical axis, you can display a dual correlation against time. For example, you might want to create a scatter chart to show how total revenues per store compare to average revenues over a period of time. Total and average revenues can be charted on individual y-axes and time can be charted on a single shared x-axis.

You can insert an axis by right-clicking the layout in the Worlds page and selecting Insert Axis. After you insert an axis, you must select it in the Data Template editor as shown in the figure below. Then, you must map objects in the data template to the columns of your query.

Figure 17. Selecting another axis in the Data Template editor
Note: In the Object Inspector, examine the data mapping specified for the initial x- and y-axis pair and match it in the new x- and y-axis pair.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004