Difference: CDLegendKeyAddNext (1 vs. 3)

Revision 32012-02-19 - JeanNeron

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="CDChartDirectorDesignerAPI"
>
>
META TOPICPARENT name="CDChartDirectorBaseChartRoutines"
 

.LEGEND KEY ADD NEXT

This subroutine adds a new legend key to the "current" Legend Box.

Revision 22011-11-10 - JeanNeron

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

.LEGEND KEY ADD NEXT

Line: 14 to 14
  PASS <draw_area> FIELD SHARE? N GOSUB 0CD .LEGEND KEY ADD NEXT
    • Check for error
Changed:
<
<
IF 0CD .LEGEND KEY ADD NEXT NE
>
>
IF 0CD .LEGEND KEY ADD NEXT NE
 

Description:

This subroutine adds a new legend key to the "current" Legend Box. Normally legend keys are added automatically when the data is added. This subroutine adds an entry with a legend entry priority of 1 (followed by 2, 3, 4, ... for repeated calls). This has higher priority than entries added automatically by the system for representing data sets. As a result, by default, the custom entry will appear before the automatic entries, unless you reverse the order with .LEGEND SET KEY ORDER

Revision 12011-09-28 - JeanNeron

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

.LEGEND KEY ADD NEXT

This subroutine adds a new legend key to the "current" Legend Box.


Usage:

      PASS         <legend_text>      FIELD            SHARE? N
      PASS         <color_spec_name>  FIELD            SHARE? N
      *        OR
      PASS         <color_value>      FIELD            SHARE? N
      PASS         <line_width>       FIELD            SHARE? N             
      PASS         <draw_area>        FIELD            SHARE? N
      GOSUB    0CD .LEGEND KEY ADD NEXT
      *        Check for error
      IF       0CD .LEGEND KEY ADD NEXT     NE

Description:

This subroutine adds a new legend key to the "current" Legend Box. Normally legend keys are added automatically when the data is added. This subroutine adds an entry with a legend entry priority of 1 (followed by 2, 3, 4, ... for repeated calls). This has higher priority than entries added automatically by the system for representing data sets. As a result, by default, the custom entry will appear before the automatic entries, unless you reverse the order with .LEGEND SET KEY ORDER

To add a legend key at a specific priority, see .LEGEND KEY INITIALIZE

<legend_text> is the text you want added to the legend

<color_spec_name> or <color_value> is the color that should be used to render the text.

<line_width> is the line width for legend entry that represents lines in line charts. Must be an unsigned integer between 0-999.

<draw_area> is a DrawArea containing the data symbol that represents the legend entry. This is primarily used for legend entries in line charts with data symbols, or in scatter charts.

All parameters are optional and will default to blank or zero.

After adding the legend key, the color_spec spec becomes the "current" color spec and the legend key will become the "current" legend key.

You have to define a Legend box via .CHART SET LEGEND BOX for this subroutine to have any effect.

See ColorSpec for more information on working with colors.

Comments:

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


<--/commentPlugin-->

-- JeanNeron - 2011-09-28

 
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