INFORMIX
Visionary User's Guide
Chapter 5: Displaying Data in a Scene
Home Contents Index Master Index New Book

Creating a Layer in a Layout

A layer is one data element in a layout that has multiple data elements. Each data element layer in a layout has a distinct data source. Layering a layout enables you to display multiple data sources in a single layout.

For example, you might want to compare sales trends for three sales regions in your company. You could create an XY chart of sales trends with three layers: one for each region. The data element that shows sales for one region is the first layer, and the data element that shows sales for a second region is a second layer, and so on. Combined into a single layout, the three data elements create a layered layout. See

Figure 5-7
Three Layers in a Layout

Figure 5-7.

Layers share the same layout; only the data source is different.

When Visionary draws the layout at runtime, each layer you have created is placed on top of the preceding layer. When you look at your scene in the Scenes panel, the last data element listed in a layout is the one that is placed on top of the preceding layers.

You can add layers to the following layouts:

Basic Steps

To create layers, you insert additional data elements into a layout. After you insert another data element, you must then insert child objects into it, and map data values to the appropriate child object. You only need to map data values to the object that will represent the data points. You can also add static objects to a data element that are not affected by output from the data source.

The basic steps you follow to add a layer to a layout are:

    1. Create a layout in a scene.

    2. Insert a second data element into the layout.

    3. Insert child objects you want to include in the second data element.

    4. Map data values to the appropriate child object.

    5. Modify the objects you insert, as desired.

Example

Suppose you have an XY chart to show sales for Region 1, and you want to add a layer to the chart to show sales for Region 2. The initial data element of the XY chart contains a curve. To create the second layer for Region 2, you must manually add objects to the second data element. For the example, two objects are added:

Tip: To determine which objects to insert into a layer of a layout, look at the child objects of the first layer. In the Scene Editor, right-click the layout and select Open Data Element. Then, view the child objects in the Object Inspector list box. Use the child objects of the initial data element as a guideline for inserting child objects into subsequent data elements.
Figure 5-8 shows an XY chart with its initial data element displayed in the Scene Editor (runtime mode) and the Object Inspector list box displaying one of the child objects of the data element.

Figure 5-8
Layout with One Layer

To insert a layer into the XY chart

    1. In the Scenes panel, right-click the XY chart where you want to add a layer and select Insert Data Element from the popup menu.

    The Data Source dialog box appears.

    2. Select the data source you want to use in the layer, as shown in figure, and click OK

    Figure 5-9
    Choosing the Data Source for the Second Data Element

    .

    A Data Element Editor window and the Object Inspector appear, and a new data element is added to the Scenes panel.

    3. Insert child objects you want into the data element.

    Choose Insert Alignment Panel.

    4. Map the data coordinates to the alignment panel.

    Select the AlignmentPanel object in Object Inspector list box.

    5. Click Runtime Mode in the Scene Editor to view the results, as shown in Figure 5-10

    Figure 5-10
    Layout with Two Layers

    .

    6. Optionally, modify objects.

    In the example, the color of the StraightConnector object is changed for each layer displayed.

Tip: To create a layer similar to an existing data element in a layout, you can copy the existing data element and change its data source. In the Scenes panel, right-click the data element you want to copy and select Copy from the popup menu. Click the layout where you want to create the layer and select Paste from the popup menu. Right-click the new data element and select Change Data Source from the popup menu.




Visionary User's Guide, version 1.0
Copyright © 1998, Informix Software, Inc. All rights reserved.