.LEGEND SET KEY ORDER
This subroutine sets the key order to be ascending or descending for the "current" Legend Box..
Usage:
PASS <key_order> FIELD SHARE? N
GOSUB 0CD .LEGEND SET KEY ORDER
* Check for error
IF 0CD .LEGEND SET KEY ORDER NE
Description:
This subroutine sets the key order to be ascending or descending for the "current" Legend Box.
To control the ordering of the legend entries, Chart Director employs a legend entry priority system. Each entry is given a priority number, and the entries are ordered according to ascending priority. For a Pie Chart, the legend entry priority of a sector is 10000 x (sector_index + 1). The Nth sector has sector_index (N - 1). That means the ordering of the sectors in the legend box is the same as the data array. For an XYChart, the base legend entry priority for a layer is 10000 x (layer_index + 1). Within a layer, the data set priority is 10 x (data_set_index + 1). For example, the legend entry priority for the 5th dataset in the 3rd layer will be 30050. That means the ordering of the data sets in the legend box follows the order in which the layers are created. For data sets within the same layer, the ordering follows the order in which the data sets are added.
The parameter is optional, and must be one of the following: asc, ascending, desc, descending. If not passed or blank, it will be set to the default value of ascending.
You have to define a Legend box via
.CHART SET LEGEND BOX for this subroutine to have any effect.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2011-09-26