Tags:
create new tag
view all tags

.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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2012-02-19 - JeanNeron
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback