Difference: CDPieSetLabelLayoutMethod (1 vs. 3)

Revision 32012-02-24 - JeanNeron

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="CDPieSetLabelBounds"
>
>
META TOPICPARENT name="CDChartDirectorPieChartRoutines"
 

.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.

Revision 22011-11-11 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="CDPieSetLabelBounds"

.PIE SET LBL LAYOUT

Line: 33 to 33
 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

Changed:
<
<
sectors.
>
>
sectors.
  If <beg_sect_no> and <end_sect_no> are both received and are both numeric integers, then <layout_meth> applies to the range
Changed:
<
<
of pie sectors from <beg_sect_no> thru <end_sect_no> and is stored in the corresponding pie sector specs.
>
>
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>
Changed:
<
<
applies only to the <beg_sect_no> pie sector and is stored in the <beg_sect_no> pie sector spec.
>
>
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.
Deleted:
<
<
  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.
Deleted:
<
<
  The last pie sector spec updated becomes the "current" pie sector spec.

Revision 12011-10-03 - JeanNeron

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CDPieSetLabelBounds"

.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.


<--/commentPlugin-->

-- JeanNeron - 2011-10-03

 
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