0924-0926

Previous Table of Contents Next

Page 924

The next chart type enables you to create a chart that shows two different data values as a mixture of columns and lines. Typically, this report indicates discreet data values on each column and the line is used to indicate summary or trend data. The standard mixed chart presents a simple column chart with a straight line chart on the same grid. You can vary the way this chart type appears by using either a straight or curved line with or without fill.

The last chart type on the top line is called the Double-Y chart. This chart provides a y-axis on both sides of the chart. Column chart variations are either a simple column or a column with overlapping bars. Line chart variances enable you to use a simple line or a line chart with symbols.

The next chart type is the pie chart, which was presented as the first chart type created. You can create either a pie chart with a shadow below it or one with depth, which appears as a 3D object. The table chart presents the data in a tabular format with the same optional effects that exist for the pie chart.

The next type is the scatter chart, which displays data on the chart as individual points in a two-dimensional coordinate system. Typically, you can use this chart type in engineering applications to display scientific data points. Options enable you to use a regression line that approximates a straight line formula for the data. You can include a grid in the chart to facilitate reading the data values. The chart can also be displayed using a logarithmic y-axis or with both axes using a logarithmic scale. Finally, you can draw the chart with lines connecting the individual data points in the order that they are retrieved.

The next chart type, the high-low chart, is typically used to analyze data values related to
values that can fluctuate within a short interval, such as stock prices over time. For each horizontal data point, there is a high value and a low value as well as (in some cases) a closing (or ending) value. The simple high-low chart indicates the high value and low value with a horizontal tick mark at each position and a vertical line connecting the two points. Variations show a closing value symbol. You can indicate the high and low value using spikes (vertical line only) rather than separate tick marks. The next subtype connects the closing values with a line. The last subtype connects consecutive data points with a fill line between the high and low values.

The final chart type is a Gantt chart. A Gantt chart is a special chart type that is used to indicate data over a specified time interval. This chart is typically used in project management to present the time schedule needed to accomplish individual tasks for the project. You can vary how this chart looks by using a background shadow or a 3D bar to show depth.

Defining Parameters for Charts

The charts created earlier in this chapter depend on the query conditions that are defined in the query definition dialog box. In practice, however, many graphical applications need the user to execute the query based on a variable parameter that is defined at runtime. Depending on the value entered, you draw the chart dynamically by changing the data in the chart at runtime, based on the selection criteria entered by the user .

Page 925

Using the columnar chart created earlier in module g38oun02.ogd, modify the chart to execute the query based on a user-specified parameter for the warehouse code and the chart year. To create a parameter, select Parameters within the Object Navigator to display the Parameters dialog box as shown in Figure 37.9. Define this parameter as a character field named P_WH_CODE with an initial value of WNJ. (Give the initial value as a valid value to help you develop the graphical display.) Additionally, create a numeric parameter called P_YEAR for the chart year.

Figure 37.9.
Creating graphics parameters.


Next, modify the chart query to include the parameters as follows :

 select to_char ( to_date (to_char (hist_month_no), `MM'), `MON'),      hist_ord_shipped from warehouse_history where hist_year = :P_YEAR and hist_wh_code = :P_WH_CODE 

The chart uses the value of the parameter at runtime to display the appropriate chart. To test the runtime capabilities of Oracle Graphics, you must first create a runtime module. (The module must be saved prior to creating the runtime module. Save this module as g38oun03.ogr.) To create the runtime module, select File Administration Generate and then create the module as g38oun03.ogr. To test the interactive capability of the module, use the following command:

 g25run module=g34oun03 userid=uid/pwd P_WH_CODE='ACA' P_YEAR=1994 

Page 926

Multiple Chart Applications

Oracle Graphics provides the capability to create individual displays that are based on multiple charts which are linked through parameters. One example of a multiple chart application is a drill-down chart, which displays a secondary chart based on data passed from one chart to the next. In other cases, a second chart can be included within the same application to display additional related data on separate chart layers .

Creating a Drill-Down Chart

A drill-down chart is a multi-chart application in which an individual chart is dependent on another linked chart. One example of this chart is shown in Figure 37.10; the two charts that were created previously are combined in a single display. By clicking an individual pie segment, the user makes the monthly shipments chart indicate the orders shipped for the warehouse associated with the segment.

Figure 37.10.
A sample drill-down chart.


To create this chart, open the warehouse shipments pie chart that was created earlier in module g38oun01.ogd. Create parameters for the warehouse code and year as in the previous section and create the monthly shipments query within the Object Navigator. Modify the pie chart query to include the year parameter and to select the warehouse code from the initial query. Navigate to the Layout Editor and use the chart drag points for the pie chart to resize the chart to provide room for the monthly shipments column chart.

Now, using the Chart tool from the Graphics tool palette, drag an area for the new column chart in a blank area of the Layout Editor. Define the column chart the same as in g38oun02, when you created the column chart.

To link the two charts in a drill-down relationship, click within the pie chart area to select
the pie chart and then click one of the pie segments. This presents the object definition property sheet. Select the Drill-down tab as shown in Figure 37.11. You use this tab to define the

Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net