2.4.324 Text

The Text record specifies the properties of an attached label and specifies the beginning of a collection of records as defined by the chart sheet substream ABNF.  This collection of records specifies an attached label.

The fShowKey, fShowValue, fShowLabelAndPerc, fShowPercent, fShowBubbleSizes, and fShowLabel fields MUST equal 0 and MUST be ignored if the current attached label does not contain an ObjectLink record that satisfies the following conditions:

§ The wLinkObj field of the ObjectLink record equals 0x0004.

§ The wLinkVar1 field of the ObjectLink record references a series.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

at

vat

wBkgMode

rgbText

x

y

dx

dy

A

B

C

D

E

F

G

H

I

J

K

L

M

N

icvText

dlp

unused3

O

trot

at (1 byte): An unsigned integer that specifies the horizontal alignment of the text. MUST be a value from the following table:

Value

Alignment

0x01

Left-alignment if iReadingOrder specifies left-to-right reading order; otherwise, right-alignment

0x02

Center-alignment

0x03

Right-alignment if iReadingOrder specifies left-to-right reading order; otherwise, left-alignment

0x04

Justify-alignment

0x07

Distributed alignment

vat (1 byte): An unsigned integer that specifies the vertical alignment of the text. MUST be a value from the following table:

Value

Alignment

0x01

Top-alignment

0x02

Center-alignment

0x03

Bottom-alignment

0x04

Justify-alignment

0x07

Distributed alignment

wBkgMode (2 bytes): An unsigned integer that specifies the display mode of the background of the text. MUST be a value from the following table:

Value

Background Mode

0x0001

Transparent background

0x0002

Opaque background

rgbText (4 bytes): A LongRGB structure that specifies the color of the text.

x (4 bytes): A signed integer that specifies the horizontal position of the text, relative to the upper-left of the chart area (section 2.2.3.17) in SPRC. This value MUST be ignored when this record is preceded by a DefaultText record or when it is followed by a Pos record; otherwise MUST be greater than or equal to 0 and less than or equal to 32767. SHOULD<132> be less than or equal to 4000.

y (4 bytes): A signed integer that specifies the vertical position of the text, relative to the upper-left of the chart area (section 2.2.3.17) in SPRC. This value MUST be ignored when this record is preceded by a DefaultText record or when it is followed by a Pos record; otherwise MUST be greater than or equal to 0 and less than or equal to 32767. SHOULD<133> be less than or equal to 4000.

dx (4 bytes): A signed integer that specifies the horizontal size of the text, relative to the chart area (section 2.2.3.17) in SPRC. This value MUST be ignored when this record is followed by a Pos record; otherwise MUST be greater than or equal to 0 and less than or equal to 32767. SHOULD<134> be less than or equal to 4000.

dy (4 bytes): A signed integer that specifies the vertical size of the text, relative to the chart area (section 2.2.3.17) in SPRC. This value MUST be ignored when this record is followed by a Pos record; otherwise MUST be greater than or equal to 0 and less than or equal to 32767. SHOULD<135> be less than or equal to 4000.

A - fAutoColor (1 bit): A bit that specifies whether the foreground text color is determined automatically.

B - fShowKey (1 bit): A bit that specifies whether the text is attached to a legend key.

C - fShowValue (1 bit):  A bit that specifies whether the value, or the vertical value on bubble or scatter chart groups, is displayed in the data label.

If the current attached label contains a DataLabExtContents record and the fPercent field of the DataLabExtContents record equals 0, this field MUST equal the fValue field of the DataLabExtContents record.

If the current attached label does not contain a DataLabExtContents record and fShowLabelAndPerc equals 1, this field MUST equal 0.

This field MUST equal 0 if the current attached label does not contain a DataLabExtContents record and one or more of the following conditions are satisfied:

  • The fShowLabelAndPerc field equals 1.

  • The fShowPercent field equals 1.

D - unused1 (1 bit): Undefined and MUST be ignored.

E - fAutoText (1 bit): A bit that specifies whether the text value of this text field is automatically generated and unchanged.

F - fGenerated (1 bit): A bit that specifies whether the properties of this text field are automatically generated and unchanged.

G - fDeleted (1 bit): A bit that specifies whether this data label was deleted by the user.

H - fAutoMode (1 bit):  A bit that specifies whether the background color is determined automatically.

I - unused2 (3 bits): Undefined and MUST be ignored.

J - fShowLabelAndPerc (1 bit):  A bit that specifies whether the category (2) name and the value, represented as a percentage of the sum of the values of the series the data label is associated with, are displayed in the data label.

MUST equal 0 if the chart group type of the corresponding chart group, series, or data point, is not a bar of pie, doughnut, pie, or pie of pie chart group.

This field MUST equal 1 if the current attached label contains a DataLabExtContents record and both of the following conditions are satisfied:

  • The fCatName and fPercent fields of the DataLabExtContents record equal 1.

  • The fSerName, fValue, and fBubSizes fields of the DataLabExtContents record equal 0.

    This field MUST equal 0 if the current attached label contains a DataLabExtContents record and one or more of the following conditions is satisfied:

  • The fCatName or fPercent fields of the DataLabExtContents record equal 0.

  • The fSerName, fValue, or fBubSizes fields of the DataLabExtContents record equal 1.

      MUST be ignored if fAutoText equals 0.

K - fShowPercent (1 bit):  A bit that specifies whether the value, represented as a percentage of the sum of the values of the series the data label is associated with, is displayed in the data label.

MUST equal 0 if the chart group type of the corresponding chart group, series, or data point is not a bar of pie, doughnut, pie, or pie of pie chart group.

If the current attached label contains a DataLabExtContents record, this field MUST equal the value of the fPercent field of the DataLabExtContents record.

If the current attached label does not contain a DataLabExtContents record and fShowLabelAndPerc equals 1, this field MUST equal 1.

      MUST be ignored if fAutoText equals 0.

L - fShowBubbleSizes (1 bit):  A bit that specifies whether the bubble size is displayed in the data label.

MUST equal 0 if the chart group type of the corresponding chart group, series, or data point is not a bubble chart group.

If the current attached label contains a DataLabExtContents record and the fPercent, fValue, and fCatName fields of the DataLabExtContents record equal 0, this field MUST equal the fBubSizes field of the DataLabExtContents record.

If the current attached label contains a DataLabExtContents record and the fPercent, fValue, or fCatName fields of the DataLabExtContents record equal 1, this field MUST equal 0.

If the current attached label does not contain a DataLabExtContents record and fShowPercent, fShowValue, or fShowLabel equal 1, this field MUST equal 0.

MUST be ignored if fAutoText equals 0.

M - fShowLabel (1 bit):  A bit that specifies whether the category (2), or the horizontal value on bubble or scatter chart groups, is displayed in the data label on a non-area chart group, or the series name is displayed in the data label on an area chart group.

This field MUST equal the fCatNameLabel field of the DataLabExtContents record if the current attached label contains a DataLabExtContents record, the chart group is non-area, and both of  the following conditions are satisfied:

  • The fValue field of the DataLabExtContents record equals 0.

  • The fShowLabelAndPerc field equals 1 or the fPercent field equals 0.

    This field MUST equal the fCatNameLabel field of the DataLabExtContents record if the current attached label contains a DataLabExtContents record, the chart group is area or filled radar, and the following condition is satisfied:

  • The fValue field of the DataLabExtContents record equals 0.

    If the current attached label contains a DataLabExtContents record and the fValue field of the DataLabExtContents record equals 1, this field MUST equal 0.

    This field MUST equal 0 if the current attached label does not contain a DataLabExtContents record and one of the following conditions is satisfied:

  • The fShowValue field equals 1.

  • The fShowLabelAndPerc field equals 0 and the fShowPercent field equals 1.

MUST be ignored if fAutoText equals 0.

N - reserved (1 bit):  MUST be zero, and MUST be ignored.

icvText (2 bytes): An Icv structure that specifies the color of the text.

dlp (4 bits): An unsigned integer that specifies the data label positioning of the text, relative to the graph object item the text is attached to. For all data label text fields, MUST be a value from the following table:

Data label position

Value

Value for chart group type

Auto

0x0

Pie chart group

Right

0x0

Line, Bubble, or Scatter chart group

Outside

0x0

Bar or Column chart group with fStacked equal to 0

Center

0x0

Bar or Column chart group with fStacked equal to 1

Outside End

0x1

Bar, Column, or Pie chart group

Inside End

0x2

Bar, Column, or Pie chart group

Center

0x3

Bar, Column, Line, Bubble, Scatter, or Pie chart group

Inside Base

0x4

Bar or Column chart group

Above

0x5

Line, Bubble, or Scatter chart group

Below

0x6

Line, Bubble, or Scatter chart group

Left

0x7

Line, Bubble, or Scatter chart group

Right

0x8

Line, Bubble, or Scatter chart group

Auto

0x9

Pie chart group

Moved by user

0xA

All

For all non-data label text fields, it MUST be 0x0.

unused3 (10 bits): Undefined and MUST be ignored.

O - iReadingOrder (2 bits): An unsigned integer that specifies the reading order of the text. MUST be a value from the following table:

Value

Reading order

0x0

The reading order is equal to the iReadingOrder value of the Text record immediately following the closest preceding Chart, DataFormat, Legend, Series, or YMult record where iReadingOrder is not equal to 0x0.  If no such preceding record exists, the DefaultText settings of the chart are used. If the DefaultText settings also specify 0x0, the reading order is determined by the application.

0x1

Left-to-right

0x2

Right-to-left

trot (2 bytes): An unsigned integer that specifies the text rotation. MUST be a value from the following table:

Value

Angle description

0 to 90

Text rotated 0 to 90 degrees counter-clockwise

91 to 180

Text rotated 1 to 90 degrees clockwise (angle is trot – 90)

255

Text top-to-bottom with letters upright