Tags:
create new tag
view all tags

.PIE SET LBL LAYOUT

This subroutine sets the label layout for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.


Usage:

      PASS         <layout_meth>              FIELD            SHARE? N
      PASS         <beg_sect_no>              FIELD            SHARE? N
      PASS         <END_sect_no>              FIELD            SHARE? N
      GOSUB    0CD .PIE SET LBL LAYOUT
      *        Check for error
      IF       0CD .PIE SET LBL LAYOUT        NE

Description:

This subroutine sets the label layout for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.

If <layout_meth> is not received or is blank, then the "current" pie sector will have it's label in the default position. Valid values for layout method are: Inside, Side and Circular.

In the circular layout method, the sector labels are positioned around the perimeter of the pie.

In the side layout method, there is an invisible rectangle containing the pie, where the rectangle can be wider than the diameter of the pie.The sector labels are positioned on the left and right sides outside the rectangle. Because the labels can be quite far away from the sectors, join lines are typically used to connect the labels to the sectors.

The circular layout method usually uses less space and is the default layout method. However, if the pie chart contains a lot of small sectors, the labels may overlap with each others, due to insufficient space on the pie perimeter to position the labels.

The side layout method has the advantages that it can avoid label overlapping. In the side layout method, labels will automatically shift up and down to avoid overlapping.

One common issue in pie charts is the data contain a lot of small sectors. If the data are sorted, the small sectors will be crowded together instead of distributed evenly. Although the side layout method can avoid label overlapping by shifting the labels up and down, some labels may need to be shifted great distances.

Label layout can often be improved if the small sectors are near the horizontal axis. It is because the amount of vertical label space for a sector is greatest at the horizontal axis. This can be achieved by choosing an appropriate start angle (using .PIE SET LAYOUT).

If the data is in ascending order (small sectors crowded at the beginning), a start angle of 45 degrees with clockwise sector layout is recommended. With this setting, the first few sectors (the smallest sectors) will be at around 45 - 135 degrees, so is near the horizontal axis (90 degrees). Similarly, if the data is in descending order (small sectors crowded at the end), a start angle of 135 degrees with clockwise sector layout can be used.

If <beg_sect_no> is "ALL" or "0" and <end_sect_no> is not received or is blank, then <layout_meth> applies to all pie

sectors.

If <beg_sect_no> and <end_sect_no> are both received and are both numeric integers, then <layout_meth> applies to the range

of pie sectors from <beg_sect_no> thru <end_sect_no> and is stored in the corresponding pie sector specs.

If <beg_sect_no> is received and is a numeric integer and <end_sect_no> is not received or is blank, then <layout_meth>

applies only to the <beg_sect_no> pie sector and is stored in the <beg_sect_no> pie sector spec.

If <beg_sect_no> and <end_sect_no> are both not received or are blank, then <layout_meth> applies to the "current" pie sector and is stored in the "current" pie sector spec.

Any pie sector specs that are referenced but which do not exist are automatically created and initialized so that the <layout_meth> can be stored.

The last pie sector spec updated becomes the "current" pie sector spec.

Comments:

Read what other users have said about this page or add your own comments.


-- JeanNeron - 2011-10-03

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-02-24 - 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