LegendTexts
LegendTexts ( text1 ; text2 ; . . . ; text10000 )
| Argument | Type | Range | Default | Note |
|---|---|---|---|---|
| text1 | styt | 0..1000 | (see desc.) | Max. 1000 chars. |
| text2 | styt | 0..1000 | (see desc.) | Max. 1000 chars. |
| ... | styt | 0..1000 | (see desc.) | Max. 1000 chars. |
| text10000 | styt | 0..1000 | (see desc.) | Max. 1000 chars. |
Examples
LegendTexts("Turnover\nDepartment A";"Turnover\nDepartment B")
Description
By using the LegendTexts() function each data series can be assigned a name. Texts consisting of several lines are possible by inserting a line feed "\n". If no or too few names are provided, the default text "Series" plus a serial number will be used for the missing names.
Please note that a legend is not created automatically by default, but rather by calling one of the four functions:
LegendTexts(), LegendStyle() , LegendBackground() , LegendOptions() .
| | LEGEND_TEXTS_01 |
| 1 | OpenDrawing(250;150) |
| 2 | ChartData(1 4; 2 3; 3 2) |
| 3 | BarChart() |
| 4 | /* Set up styles. */ |
| 5 | FillStyle(1;160 160 160 220) |
| 6 | FillStyle(2;120 120 120 220) |
| 7 | FillStyle(3;200 50 50 220) |
| 8 | |
| 9 | /* Set up axes. */ |
| 10 | |
| 11 | |
| 12 | AxisMajorTicks(all;0) |
| 13 | /* Set up legend. */ |
| 14 | |
| 15 | /* Set up grid. */ |
| 16 | MajorGridLineWidths(x;y;0.25) |
| 17 | MajorGridLineWidths(y;x;0) |
| 18 |
| | LEGEND_TEXTS_02 |
| 1 | OpenDrawing(250;150) |
| 2 | ChartData(1 4; 2 3; 3 2) |
| 3 | BarChart() |
| 4 | /* Set up styles. */ |
| 5 | FillStyle(1;160 160 160 220) |
| 6 | FillStyle(2;120 120 120 220) |
| 7 | FillStyle(3;200 50 50 220) |
| 8 | |
| 9 | /* Set up axes. */ |
| 10 | |
| 11 | |
| 12 | AxisMajorTicks(all;0) |
| 13 | /* Set up legend. */ |
| 14 | LegendTexts("Department\n12-A";"Department\n12-B") |
| 15 | /* Set up grid. */ |
| 16 | MajorGridLineWidths(x;y;0.25) |
| 17 | MajorGridLineWidths(y;x;0) |
| 18 |
For further information, e.g. styled texts, hyphenation, please refer to Texts.