SetLegend method: Chart class
Syntax
SetLegend(&Array_of_String)
Description
Use the SetLegend method to specify alternative legends. By default, the legends are populated from the record field specified with SetDataSeries.
This method is used to write both the overlay legend and the series legend. The labels are overwritten in the order of elements in the array, that is, the first element overwrites the first series, the second overwrites the second, and so on, with the last element in the array overwriting the overlay legend. There can be more than one series in an overlay.
If you do not specify an element for an array (that is, a blank or a null) then no legend is listed for that series.
Note:
Default label text is not automatically translated. If you set your own labels, be sure to use translated text, such as message catalog entries.
Note:
Legends are not available for funnel charts. Therefore, this method is not applicable for a funnel chart.
Parameters
| Parameter | Description |
|---|---|
|
&Array_of_String |
Specify an already instantiated array of string, containing the text that you want to use for the legend. |
Returns
None.
Example
The following example displays a legend containing only the overlay.
&LegendArray = CreateArray("", "", "Revenue");
&MyChart.SetLegend(&LegendArray);
Related Topics