The LEGEND record defines the location of the legend on the display and its overall size. The displayed legend contains all series on the chart.
Record Data — BIFF8
Offset |
Name |
Size |
Contents |
4 |
x |
4 |
x-position of upper-left corner |
8 |
y |
4 |
y-position of upper-left corner |
12 |
dx |
4 |
x-size |
16 |
dy |
4 |
y-size |
20 |
wType |
1 |
Type |
21 |
wSpacing |
1 |
Spacing |
22 |
grbit |
2 |
Option flags |
The x, y, dx, and dy fields are in units of 1/4000 of the chart area.
The x and y fields define the position of the upper-left corner of the bounding rectangle that encompasses the legend. The position of the legend is referenced to the document window. The dx and dy fields define the overall size (the bounding rectangle) of the legend.
The wType field defines the location of the legend relative to the plot rectangle of the chart. The wSpacing field is always 1 for Microsoft Excel.
The grbit field contains the following option flags.
Offset |
Bits |
Mask |
Name |
Contents |
0 |
0 |
01h |
fAutoPosition |
Automatic positioning (1 = legend is docked) |
1 |
02h |
fAutoSeries |
Automatic series distribution (TRUE in Microsoft Excel 5.0) | |
2 |
04h |
fAutoPosX |
X positioning is automatic | |
3 |
08h |
fAutoPosY |
Y positioning is automatic | |
4 |
10h |
fVert |
1 = vertical legend (a single column of entries) | |
5 |
20h |
fWasDataTable |
1 = chart contains data table | |
7 – 6 |
C0h |
(reserved) |
Reserved; must be zero | |
1 |
7 – 0 |
FFh |
(reserved) |
Reserved; must be zero |
Record Data — BIFF7 and earlier
Offset |
Name |
Size |
Contents |
4 |
x |
4 |
x-position of upper-left corner |
8 |
y |
4 |
y-position of upper-left corner |
12 |
dx |
4 |
x-size |
16 |
dy |
4 |
y-size |
20 |
wType |
1 |
Type |
Offset |
Name |
Size |
Contents |
21 |
wSpacing |
1 |
Spacing |
22 |
grbit |
2 |
Option flags |
The x, y, dx, and dy fields are in units of 1/4000 of the chart area.
The x and y fields define the position of the upper-left corner of the bounding rectangle that encompasses the legend. The position of the legend is referenced to the document window. The dx and dy fields define the overall size (the bounding rectangle) of the legend.
The wType field defines the location of the legend relative to the plot rectangle of the chart. The wSpacing field is always 1 for Microsoft Excel.
The grbit field contains the following option flags.
Offset |
Bits |
Mask |
Name |
Contents |
0 |
0 |
01h |
fAutoPosition |
Automatic positioning (1 = legend is docked) |
0 |
1 |
02h |
fAutoSeries |
Automatic series distribution (TRUE in Microsoft Excel 5.0) |
0 |
2 |
04h |
fAutoPosX |
X positioning is automatic |
0 |
3 |
08h |
fAutoPosY |
Y positioning is automatic |
0 |
4 |
10h |
fVert |
1 = vertical legend (a single column of entries) |
0 |
7 – 5 |
E0h |
(reserved) |
Reserved; must be zero |
1 |
7 – 0 |
FFh |
(reserved) |
Reserved; must be zero |