Visit Gigasoft's Web Site
 ProEssentials v9 Help

OverlapMultiAxes

Scope

Pego, Pesgo

Type

Property Array of type Int32

Default

empty

.NET

PeGrid.OverlapMultiAxes

Ocx|Vcl

OverlapMultiAxes

DLL

PEP_naOVERLAPMULTIAXES

 

Purpose

This property array lets you subdivide your MultiAxesSubsets as MultiAxesSubsets let you subdivide your Subsets. In other words, you can subdivide your MultiAxesSubsets among overlapping multiple axis sections. Like MultiAxesSubsets, these overlapping sections start at the top and grow downward.

 

Since certain axes will be overlapped, the property array MultiAxesProportions now should contain the same number of elements as the OverlapMultiAxes property array, and not the same as MultiAxesSubsets as is the case when no OverlapMultiAxes are defined.

 

Comments

Many examples within our demo use this feature, though see examples 103 and 104 for more info.

 

PeGrid.OverlapMultiAxes members of Pego.PeGrid, Pesgo.PeGrid

 

See Also, MultiAxesSubsets, MultiAxesProportions and WorkingAxis.

 

Note that Chapter 7, Question 18 has a thorough discussion on multiple y axes.

 

MultiAxesSubsets ActiveX Example:

 

To understand Overlapping multi axes, you first need to understand MultiAxesSubsets.

The following is an example of MultiAxesSubsets.

 

Pego1.Subsets = 5

Pego1.Points = 4

For s = 0 To 4

For p = 0 To 3

If (s = 2) Then '** Third subset is scaled larger

  Pego1.YData(s, p) = (50 + Rnd(250))

Else

  Pego1.YData(s, p) = (5 + Rnd(25))

End If

Next p

Next s

 

'** Dividing Subsets Among 3 Y Axes

Pego1.MultiAxesSubsets(0) = 1 '** top axis has 1 subset

Pego1.MultiAxesSubsets(1) = 2 '** next axis has 2 subsets

Pego1.MultiAxesSubsets(2) = 2 '** last axis has 2 subsets

 

Pego1.WorkingAxis = 1 '** 1 = zero based index for middle axes

Pego1.PlottingMethod = GPM_BAR

Pego1.RYAxisComparisonSubsets = 1

Pego1.PlottingMethodII = GPMII_SPLINE

Pego1.YAxisLabel = "Mid Left"

Pego1.RYAxisLabel = "Mid Right"

 

Pego1.WorkingAxis = 0 '** Always reset WorkingAxis to zero

Pego1.MultiAxesSeparators = PEMAS_THICKPLUSTICK

Pego1.GridLineControl = PEGLC_NONE

Pego1.PEactions = 0 '** Reinitialize And Reset

 

Note that when we add up all the MultiAxesSubsets values (1, 2, 2) they equate to 5 the same value we set for the Subsets property. This should always be the case.

 

image\IMG00001.gif

 

Overlapping Example

 

Lets expand on the above example. This time we want the middle and bottom y axes to overlap, using the same chart real-estate.

 

All we do is add the two following lines of code...

'** Dividing MultiAxesSubsets into overlapping sections

Pego1.OverlapMultiAxes(0) = 1

Pego1.OverlapMultiAxes(1) = 2

 

To further discuss...

Pego1.OverlapMultiAxes(0) = 1

The above line of code tells ProEssentials that the first overlapping section will have 1 multi-axis. Thus, there really is no overlapping taking place in this first section.

 

Pego1.OverlapMultiAxes(1) = 2

The above line of code tells ProEssentials that the second overlapping section will have 2 multi-axes. This causes the last 2 MultiAxesSubsets defined to overlap each other.

 

Now, note that when we add up all the OverlapMultiAxes values (1, 2) they equate to 3 the same number of MultiAxesSubsets elements we defined ...

element 1-> Pego1.MultiAxesSubsets(0) = 1

element 2-> Pego1.MultiAxesSubsets(1) = 2

element 3-> Pego1.MultiAxesSubsets(2) = 2

This should also always be the case in your code.

 

image\IMG00002.gif

 

Since stacking y axes horizontally can result in using a lot of real-estate, you will want to set the FontSize property to SMALL, and also might want to adjust the FontSizeGlobalCntl to 0.8.

 

As a general implementation hint. First ignore OverlapMultiAxes and MultiAxesProportions and initially implement only MultiAxesSubsets. After you have all the individual axes looking as desired, then add the OverlapMultiAxes property elements to overlap the desired axes. Finally if needed add MultiAxesProportions to contain the same number of elements as OverlapMultiAxes. If you follow this approach it will greatly enhance your understanding on how OverlapMultiAxes is implemented. Note that when implementing MultiAxesSubsets, the subsets have to be in the order that you wanted them allocated to axes. The same goes for OverlapMultiAxes and the axes have to be in the order that you want them allocated to overlap.