Creating Multiple Graphs With Advanced Merge

How to:

Reference:

Advanced Merge functionality is enabled by default in Advanced Graph Assistant and enables you to build complex graph requests with multiple sort fields. Graphs are merged according to the dimensions specified by adding sort fields to the X group axis, Series-legend, and Multi-graph sort containers ("buckets"), located below the Chart icon in the query pane. These buckets determine how and where multiple sort fields are plotted, and are represented by the X group axis, Series-legend, and Multi-graph icons, as shown in the following image.

multiple sort fields

You can add sort fields to these buckets to create multiple graphs, nested X-axis graphs, merged graphs, and any combination of these graph types.

Each sort field bucket has characteristics and limitations, as described in the following:

Note: Advanced Merge also enables you to create Coordinated Reports in Power Painter where multiple TABLE and GRAPH requests are tied together by common sort field values. For more information about Power Painter, see the Creating Compound Reports With Power Painter manual.


Top of page

x
Procedure: How to Create Graphs With Advanced Merge Functionality
  1. Click the Data selection tab of Advanced Graph Assistant.
  2. Select one field for the Y-axis.

    Click a field in the Available Fields pane, drag in into the Graph Preview area, and drop in on the Y axis icon.

    or

    Click a field in the Available Fields pane, drag it into the query pane below the Chart icon, and drop it on the Y axis icon.

  3. Select one field for the X-axis. Optionally, to create a nested X-axis, repeat this step one or two more times to create a two or three level nested X-axis.

    Click a field in the Available Fields pane, drag it into the Graph Preview area, and drop it on the X group axis icon.

    or

    Click a field in the Available Fields pane, drag it into the query pane below the Chart icon, and drop it on the X group axis icon.

  4. Optionally, select one field to add to the legend to create a secondary X-axis.

    Click a field in the Available Fields pane, drag it into the Graph Preview area, and drop it on the Series-legend icon.

    or

    Click a field in the Available Fields pane, drag it into the query pane below the Chart icon, and drop it on the Series-legend icon.

    Note: To display the Series-legend icon, the Crosstab Mode Chart property must be set to Yes. For details, see How to Enable Series-legend (Crosstab Mode) Functionality.

  5. Optionally, select one field to act as a page-break to create multiple graphs.

    Click a field in the Available Fields pane, drag it into the Graph Preview area, and drop it on the Multi-graph icon.

    or

    Click a field in the Available Fields pane, drag it into the query pane below the Chart icon, and drop it on the Multi-graph icon.

    Note: As you add fields and perform any customizations to your graph, the graph preview area immediately displays the changes. An exception is when you add a field to the Multi-graph icon to create multiple graphs, which cannot be displayed in one location (such as the graph preview area) at the same time.

  6. Run the graph and the output is displayed in a separate browser window.

Top of page

x
Procedure: How to Create a Nested X-axis Graph

Select the GGSALES data source when opening Advanced Graph Assistant.

  1. Add the DOLLARS field to the Y axis bucket.
  2. Add the REGION, CATEGORY, and PRODUCT fields to the X group axis bucket.

    The Chart area should contain all of the fields added in the previous steps and appear, as shown in the following image.

    multiple x-axis fields for a chart

  3. Add the following filter to limit the product types and categories displayed in the output by only including the Midwest region:

    WHERE GGSALES.SALES01.REGION EQUAL to Midwest

  4. Run the graph.

    The nested X-axis graph output appears, as shown in the following image.

    nested x-axis graph output


Top of page

x
Procedure: How to Create a Merged Graph

Select the GGSALES data source when opening Advanced Graph Assistant.

  1. Add the DOLLARS field to the Y axis bucket.
  2. Add the PRODUCT field to the X group axis bucket.
  3. Add the REGION field to the Series-legend bucket.

    The Chart area should contain all of the fields added in the previous steps and appear, as shown in the following image.

    multiple field dimensions for a chart

  4. Add the following filter to limit the number of product types displayed in the output by excluding products in the gift category:

    WHERE GGSALES.SALES01.CATEGORY NOT EQUAL to Gifts

  5. Run the graph.

    The merged graph output appears, as shown in the following image.

    merged graph output

    Four graphs, one for each region, are merged into one in the graph output. The legend area at the bottom of the graph shows the four region values associated with the product. These values are 'Dollar Sales: Midwest', 'Dollar Sales: Northeast', 'Dollar Sales: Southeast', and 'Dollar Sales: West'.


Top of page

x
Procedure: How to Create Multiple Graphs

Select the GGSALES data source when opening Advanced Graph Assistant.

  1. Add the DOLLARS field to the Y axis bucket.
  2. Add the PRODUCT field to the X group axis bucket.
  3. Add the REGION field to the Multi-graph bucket.

    The Chart area should contain all of the fields added in the previous steps and appear, as shown in the following image.

    multiple field dimensions for a chart

  4. Add the following filter to limit the number of PRODUCT types displayed in the output by excluding products in the gift category:

    WHERE GGSALES.SALES01.CATEGORY NOT EQUAL to Gifts

  5. Run the graph.

    The following image shows the first of four graphs created in the multi-graph output.

    multi-graph output

    One graph is displayed in the output for each of the four regions (Midwest, Northeast, Southeast, West).


Top of page

x
Reference: Advanced Merge Syntax

The Advanced Merge feature is enabled by default in Advanced Graph Assistant with the following code:

ON GRAPH SET GRMERGE ADVANCED

The three dimensions used in Advanced Merge determine how and where multiple sort fields are plotted. These dimensions are represented by the following SET commands, which are always generated in a graph request:

ON GRAPH SET GRMULTIGRAPH [0|1]
ON GRAPH SET GRLEGEND [0|1]
ON GRAPH SET GRXAXIS [1|2|3]

The following is a description of each new SET command:

Note: In the syntax of a graph request, the order of the BY sort fields is important. The BY fields are allocated in the order they appear in the code to the GRMULTIGRAPH, GRLEGEND, and GRXAXIS commands depending on the number of dimensions specified for each. The sum of all BY sort fields specified in a graph request must be equal to the sum of all dimensions.


Top of page

x
Procedure: How to Enable Series-legend (Crosstab Mode) Functionality

To display the Series-legend icon and enable secondary X-axis functionality:

  1. Click anywhere on the chart displayed in the graph preview area.

    or

    Click the Chart icon Chart icon in the query pane below the Available Fields tab.

    The Chart Properties form is displayed below the graph preview area.

  2. Click the Value column in the row that displays Crosstab Mode in the Property column.

    A drop-down arrow appears at the far right edge of the row in the Value column.

  3. Click the down arrow to open the drop-down list.
  4. Select Yes.

WebFOCUS