Difference: CDLegendSetKeyTemplate (1 vs. 2)

Revision 22011-11-10 - JeanNeron

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

.LEGEND SET TEMPLATE

Line: 9 to 9
 
      PASS         <template>        FIELD            SHARE? N
      GOSUB    0CD .LEGEND SET TEMPLATE
      *        Check for error

Changed:
<
<
IF 0CD .LEGEND SET TEMPLATE NE
>
>
IF 0CD .LEGEND SET TEMPLATE NE
 

Description:

This subroutine sets a template for the current legend text.

Revision 12011-09-27 - JeanNeron

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

.LEGEND SET TEMPLATE

This subroutine sets the template for the style for the "current" legend.


Usage:

      PASS         <template>        FIELD            SHARE? N
      GOSUB    0CD .LEGEND SET TEMPLATE
      *        Check for error
      IF       0CD .LEGEND SET TEMPLATE     NE

Description:

This subroutine sets a template for the current legend text.

The default template is "{dataSetName}", which means the name of the data set will be used as the legend text. The legend key text can be modified to include other information. For example, in a pie chart, "{label}: {value}" means the legend text will consist of the sector label followed by the sector value.

As of this writing, you must enclose the template text in quotations, otherwise the chart will not render. For example, set it to "{label}: {value}", not {label}: {value}.

Please refer to Parameter Substitution and Formatting in the Chart Director documentation for all available parameters and how to format them.

The parameter is optional, if blank or not passed, it will be reset to the default.

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.


<--/commentPlugin-->

-- JeanNeron - 2011-09-27

 
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