0915-0919

Previous Table of Contents Next

Page 915

CHAPTER 37

Oracle Graphics

IN THIS CHAPTER

  • The Oracle Graphics Environment 916
  • Defining Displays 920
  • Defining Parameters for Charts 924
  • Multiple Chart Applications 926
  • Formatting Charts with Text and Breaks 930
  • Advanced Formatting Techniques 933

Page 916

An old adage states, "A picture paints a thousand words." This adage is certainly evident in many executive information systems. By being able to view database trends graphically, an Oracle database user is able to make better decisions based on this data. You use Oracle Graphics 2.5 to graphically display database information.

You can run Oracle Graphics 2.5 to display data charts from the Oracle database; however, this tool is used primarily as a graphical server that can present Oracle data within other compatible applications such as Oracle Forms or Oracle Reports. This chapter explains how to create graphs and charts of Oracle data. These charts encompass many of the available chart types and techniques that you can use to create highly useful displays of graphical data.

The Oracle Graphics Environment

Like Oracle Forms and Oracle Reports, Oracle Graphics is designed to operate in a graphical user interface (GUI) environment such as Microsoft Windows. You can perform functions either by selecting them from a menu or by clicking an iconic button. The Oracle Graphics Designer consists of two primary components : the Object Navigator and the Layout Editor.

The Layout Editor

The Layout Editor (shown in Figure 37.1) presents a canvas that contains the charts as they are created. You operate this tool by using iconic buttons and menus . You use the buttons along the left side of the Layout Editor window to create and manipulate the chart layout objects. Table 37.1 describes these buttons (top to bottom, left to right).

Figure 37.1.
Oracle Graphics Layout Editor.


Page 917

Table 37.1. Layout Editor buttons.

Button
Usage
Select Select objects from canvas.
Magnify Zoom in/out in Layout Editor. Click the canvas to zoom in at
the mouse location. Click while holding the Shift key to zoom out.
Rectangle Draw a rectangle.
Ellipse Draw an ellipse or circle.
Polygon Draw a multi-sided object.
Rounded Rectangle Draw a rectangle with rounded corners.
Chart Add a new chart to the layout.
Symbol Insert a chart symbol.
Rotate Rotate the object.
Reshape Reshape the object.
Line Draw a line.
Arc Draw an arc segment.
Polyline Draw a series of connected lines.
Freehand Draw in freehand mode.
Text Insert text.
Text Field Insert a text field.

Below these iconic buttons is a square that displays the current visual attribute for the selected item (or the default, if no object is selected). This display indicates the fill color, line color, and text color for the object. Below the display is a series of three palette controls that you use to adjust the visual attribute. The fourth button in this area defines the current symbol to be used for charts that display a symbol.

At the top of the Layout Editor window is another series of iconic buttons that are used for module control. The first two buttons open an existing chart and save the current chart. The next button is used to start the runtime simulator to test the operation of the graphics module as it would operate in production. The last three buttons are used to cut, copy, and paste layout objects between the display and the Windows clipboard.

Initializing the Graphics Environment

To ensure compatibility with other tools, Oracle Graphics enables you to initialize the designer environment based on a set of personal (and possibly departmental) preferences. To configure Oracle Graphics, select the Tools Options dialog box by selecting Tools Tools Options from the menu.

Page 918

The Oracle Graphics 2.5 options are defined in two tabs. The first tab, Defaults, defines the parameters for charts that are created in the Graphics Designer; the first field defines the copyright message that appears on the charts. Figure 37.2 shows this dialog box.

Figure 37.2.
The Oracle Graphics Defaults tab.


In the next field in the Defaults tab, you set the color palette file to be used for the chart. (The example shown uses Oracle's 16-color palette, which is the recommended setting for most applications.) You use Color Palette mode to define how color palettes should be handled in Oracle Graphics. The options for the listbox are Editable, Read Only_Shared, and Read Only_Private. Editable means that the color palette of the active chart replaces the system color palette. This shows the active chart accurately, whereas the appearance of any inactive charts might not be accurate. Read Only_Shared means that each chart's color palette is appended to the system palette until the space reserved for the palette becomes full. If you open any charts that use a different color palette, they might not appear accurately. Finally, Read Only_Private operates the same as shared mode except that Graphics ensures that the palette used is always valid for the active chart; any inactive charts might not appear correctly because their color palettes were cleared to make room for the new chart.

The Date and Number buttons are used to establish format masks for dates and numeric fields in Oracle Graphics. You can use these masks throughout the designer to display data.

The last set of fields on the Defaults tab defines the default page width and height and the unit of measure for the chart.

You use the second tab in the Tools Options dialog box to define the user preferences in the designer. (See Figure 37.3.) You can set the Startup options to automatically create a new blank display, prompt for an existing display, or do nothing whenever the Graphics Designer is started. If the checkbox in this block is selected, Oracle Graphics Designer prompts you to log in to the database whenever the Designer is started.

Page 919

Figure 37.3.
The Oracle Graphics Preferences tab.


Under the General Options box, the Sound Output option is based on the sound drivers that were installed in the operating environment. (These drivers are installed in the Control Panel for Microsoft Windows 3.1.) Image Compression determines how graphical objects are stored in the graphics file. If you select No Compression, the resulting file is larger; however, when you select Compression, the application runs more slowly as the image is decompressed.

The last six options in the Preferences tab define the way Oracle Graphics operates in the Designer and during runtime operation. Checking Automatic Character Set Conversion causes Oracle Graphics to automatically convert the character set used by Oracle Graphics to the default set based on the National Language Support (NLS) setting for the user. You need to select this option when you develop an application for international use. Smooth Redraw at Runtime instructs Graphics to redraw any "damaged" screen areas in an internal memory buffer before the screen is updated. This option can reduce flickering and should be used unless there are memory problems.

The Keep Backup File option makes Oracle Graphics copy the Graphics file to a backup (extension .BAK) before saving the new version. The last two options, Apply Properties on Navigation and Apply Query Properties on Execution, instruct Oracle Graphics to apply any changes to the display whenever you navigate out of the object. Otherwise, you are prompted to apply the changes before navigation is allowed.

Creating a New Display

As stated in the previous section, you can configure Oracle Graphics to automatically open a new blank display upon startup. However, if you need to create a new display after startup, you can do so by selecting File New Display from the Designer menu or using the Ctrl+N hotkey. A new blank display is created in the Object Navigator according to the preferences defined in the Tools Options dialog box.

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