LegendStyle
Modified in version 5.0
LegendStyle ( font ; size ; style ; color ; alignment ; orientation ; textWidthMax ; textHeightMax ; ellipsisPosition ; shadowEffect ; shadowColor )
| Argument | Type | Range | Default | Note |
|---|---|---|---|---|
| font | str | 0..1000 | ApplFont | |
| size | num | 0..1000 | 9 | Dimension:[pt] |
| style | int | 0..7 | plain | |
| color | rgba | 0..255 | black | |
| alignment | int | 1..3 | left | |
| orientation | num | -360..+360 | 0 | Dimension:[deg] |
| textWidthMax | num | -1..10000 | -1 | Dimension:[pt] |
| textHeightMax | num | -1..10000 | -1 | Dimension:[pt] |
| ellipsisPosition | int | 0..4 | 3 | |
| shadowEffect | num[] | -1000..1000 | 0 | |
| shadowColor | rgba | 0..255 | #888a |
Examples
LegendStyle(Times New Roman)
LegendStyle(Times New Roman;12;bold)
LegendStyle(;;bold+underline;blue)
Description
The text style of the legend is defined by using the LegendStyle() function. The attributes orientation, textWidthMax, textHeightMax and ellipsisPosition are discussed in the LabelStyle() function.
| | LEGEND_STYLE_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 | LegendTexts("Employee 1";"Employee 2";"Employee 3") |
| 15 | LegendStyle(Courier;13;bold;#666) |
| 16 | /* Set up grid. */ |
| 17 | MajorGridLineWidths(x;y;0.25) |
| 18 | MajorGridLineWidths(y;x;0) |
| 19 |