Visit Gigasoft's Web Site
ProEssentials v8 Help

Common Question 9

How do I get rid of or control the subset legends?

You use the SubsetsToLegend property to control which subsets have a legend, or prevent all legends. By default, all subsets will have a legend.

 

Showing only selected subsets in Legend

For example: to show only the 1st, 3rd and 5th subsets.

Pego1.PeLegend.SubsetsToLegend(0) = 0 ' 0 means zero based 1st subset

Pego1.PeLegend.SubsetsToLegend(1) = 2 ' 2 means zero based 3rd subset

Pego1.PeLegend.SubsetsToLegend(2) = 4 ' 4 means zero based 5th subset

 

To remove all legends, set index 0 to -1 like...

Pego1.PeLegend.SubsetsToLegend(0) = -1 ' disables legend

 

To empty this property array and revert back to showing all legends....

Pego1.PeLegend.SubsetsToLegend(-1) = 0 ' shows all legends

 

 

Legend Size and Location

The size of the legend area can be controlled with the FontSizeLegendCntl property.

 

LegendLocation is used to position the legend on top, left, right, or bottom.

 

Version 6 adds some more legend possibilities via LegendStyle that works in conjunction with MultiAxisStyle. This is a nice feature to place the legend within or above an axis and only show those subsets within the axis.

 

 

Adding Items to a Legend

LegendAnnotationType, LegendAnnotationColor, and LegendAnnotationText can be used to add legends which represent annotations. These legends will only show if ShowAnnotations = TRUE.

 

 

Legend Alternatives

The table annotation feature is an excellent alternative to the built-in automatic legend.  With the table annotation feature, you have more control of the location, text, symbols, colors, and styles used to manually construct a legend.  Within the demo, see examples 026, 027, 028, 029 and 030.