This is all handled by the framework. Legend is instantiated in the graph as instance variable legend. When stroking individual plots this instance variable is used by the individual Legend() methods in the plot classes to add whatever the individual plots need to add.
Hide legend box
Argument | Default | Description |
---|---|---|
$aHide | true | True = hide |
Example
Specify the position for the legend box
Argument | Default | Description |
---|---|---|
$aX | X coordinate | |
$aY | Y coordinate | |
$aHAlign | "right" | Horizontal alignment |
$aVAlign | "top" | Vertical alignment |
Horizontal: 'left','right','center'
Vertical: 'bottom','top','center'
Please note that the X and Y positions should be give as fractions , i.e Pos(0.1,0.1)
If the alignment is not given the the default is 'right','top'
Example
Specify X and Y coordinate for the legend box
Argument | Default | Description |
---|---|---|
$aX | x Coordinate | |
$aY | y Coordinate | |
$aHAlign | "right" | Horizontal anchor point |
$aVAlign | "top" | Vertical Anchor point |
Example
Set color on frame around box
Argument | Default | Description |
---|---|---|
$aFontColor | Font coor | |
$aColor | 'black' | Frame color |
Example
Specify the number of text columns to use
Argument | Default | Description |
---|---|---|
$aCols | Number of columns |
By default i column us used.
Example
Specify fill color for legend box
Argument | Default | Description |
---|---|---|
$aColor | Fill color |
Example
Set font for texts in legend box.
Argument | Default | Description |
---|---|---|
$aFamily | Font family | |
$aStyle | FS_NORMAL | Font style |
$aSize | 10 | Font size |
Example
Specify the width of the frame around the Legend box
Argument | Default | Description |
---|---|---|
$aWeight | Width in pixels |
Example
Specify margin between columns in te legend
Argument | Default | Description |
---|---|---|
$aXMarg | No description available |
Specify vertical or horizontal legend layout
Argument | Default | Description |
---|---|---|
$aDirection | LEGEND_VERT | Layout for legend box |
Allowed arguments: LEGEND_VERT,LEGEND_HOR
Please note that horizontal layout is only suitable for a few legends since it makes use of quite a lot of horizontal space.
Example
Specify marging between the left edge and the first column
Argument | Default | Description |
---|---|---|
$aXMarg | No description available |
Extra vertical spacing (in pixels) between rows
Argument | Default | Description |
---|---|---|
$aSpacing | Extra margin (in pixels) |
Example
Set the line width for the indicators.
Argument | Default | Description |
---|---|---|
$aWeight | Line weight in pixels |
Example
Argument | Default | Description |
---|---|---|
$aSize | No description available |
Specify the size of the marker in pixels
Argument | Default | Description |
---|---|---|
$aSize | Size in pixels |
It is often desirable to use a smaller size for the marks in the legend than in the graph itself.
Example
Argument | Default | Description |
---|---|---|
$aSize | No description available |
Alias for Pos. Specify Position for Legend
Argument | Default | Description |
---|---|---|
$aX | X position | |
$aY | Y position | |
$aHAlign | "right" | Horizontal anchor point |
$aVAlign | "top" | Vertical anchor point |
Example
Print the legend in reverse order
Argument | Default | Description |
---|---|---|
$f | true | TRUE=In reverse order |
Example
Add a drop shadow to the legend box
Argument | Default | Description |
---|---|---|
$aShow | 'gray' | True = show drop shadow |
$aWidth | 2 | Width of drop shadow in pixels |
Example
Specify the margin between rows in the legend
Argument | Default | Description |
---|---|---|
$aSpacing | No description available |