Chart Styles
This section contains the format for the chart style records that include information to change the
style or appearance of a data chart, organizational chart, or text chart. These chart style records
are contained inside the Chart_Style record, record number 16 (0x10). See Record Type 16
(0x10) Chart_Style in Record Descriptions in the Record Area section of this manual for the
complete format.
Chart Records
Each record in the file is preceded by a prefix indicating the record type and length of the record.
Example of a chart data record:
Record Type (byte)
Record Length (byte, short integer, or long integer)
Record Data (variable length)
Code must be written to handle future record types that are not yet implemented (and extensions
of current record types) by looking for the length value and skipping the associated (or extra)
information. All extensions of current record types must be added to the end of the record.
The length may be byte, short integer, or long integer, depending on the number of bytes that
follow the record type. The prefix for each record has one of the following structures:
For records with byte lengths:
Byte | Meaning |
0 | Record type |
1 | Byte length 0-254 (0-0xFE) |
For records with short integer lengths:
Byte | Meaning |
0 | Record type |
1 | 0xFF (signals that short or long integer follows) |
2 | Record length, low byte |
3 | Record length, high byte 0-127 (0-0x7F) |
For records with long integer lengths:
Byte | Meaning |
0 | Record type |
1 | 0xFF (signals that short or long integer follows) |
2 | Record length, low byte of high short integer |
3 | Record length, high byte of high short integer (high bit is set to indicate long integer length) |
4 | Record length, low byte of low short integer |
5 | Record length, high byte of low short integer |
For records with long integer lengths, the high bit of the high byte of the high short integer is
always set, and is not considered part of the length. Thus, the high short integer of a long integer
length can range from 0 (0x0) to 32767 (0x7FFF).
General Notes
Angles are specified in degrees (0-360). Rotation is counterclockwise with 0 degrees being
horizontal and to the right.
Colors are saved as four bytes using RGBT (Red, Green Blue, Transparency). See Data
Precision under Record Data in the Record Area section for more information on RGBT colors.
All colors are in single-precision values only in the chart style records.
Record Types
The following is a short list of chart record types. Detailed information about each record type
follows this list.
Type # | Record Type | Usage |
0 (0x00) | Start Chart | All charts |
1 (0x01) | Reserved | |
2 (0x02) | Axis Definition | Data charts |
3 (0x03) | Frame/Base Definition | Data charts |
4 (0x04) | Grid Definition | Data charts |
5 (0x05) | Chart Styles | Data charts |
6 (0x06) | Chart Sizes | Data charts |
7 (0x07) | Viewing Information | Data charts |
8 (0x08) | Item Definition | Data charts |
9 (0x09) | Surface/Table Color Table | Data charts |
10 (0x0A) | Pie Information | Data charts |
11 (0x0B) | Pie Style | Data charts |
12 (0x0C) | Attribute Record | All charts |
13 (0x0D) | Text Box Definition | Data charts |
14 (0x0E) | Text Initial Codes | Data and organization charts |
15 (0x0F) | Text/Box Position | All charts |
16 (0x10) | Organizational Chart View | Organization charts |
17 (0x11) | Organizational Chart Text/Box | Organization charts |
18 (0x12) | Organizational Chart Connectors | Organization charts |
19 (0x13) | Text Chart Highlight Box | Text charts |
20 (0x14) | Paragraph Definition | Text charts |
21 (0x15) | Justification | Text charts |
22 (0x16) | X Name Information | Data charts |
23 (0x17) | Style Revision Number | All charts |
The first record types must be the Start Chart record, followed by the Revision Number (record
type 23 (0x17)). There can be more than one record of each type.
Record Type 0 (0x00)
Start Chart
Description
Indicates what kind of chart the data represents. Must appear as the first record.
Structure
<kind of chart>
0 = data (bar, pie, etc.)
1 = text
2 = organizational
Note
The Start Chart record must be followed by the Style Revision Number record (record type 23 (0x17)).
Record Type 1 (0x01)
Reserved
Record Type 2 (0x02)
Axis Definition
Description
Defines the attributes of one chart axis.
Structure
<which axis>
0 = Y axis left
1 = Y axis right
2 = X axis
scale factor
axis maximum value
axis minimum value
axis major increment value
<# of minor increments>
<axis flags>
bit 0: AXMANUAL
bit 1: AXLOGSCL
bit 2: AXZEROSTRT
Record Type 3 (0x03)
Frame/Base Definition
Description
Defines the attributes of the chart frames and base. A frame is the backdrop around the chart that
the grid lines are drawn on. On a two-dimensional chart there is only the back and/or front. On a
three-dimensional chart there can also be left, right, top, and bottom frames.
Structure
<which frame flags>
bit 0: back
bit 1: left side
bit 2: right side
bit 3: front side
bit 4: top side
bit 5: bottom side
<base>
0 = off
1 = on
[height of the base (0-100%)]
[base entity flags]
[frame entity flags]
Record Type 4 (0x04)
Grid Definition
Description
Defines the attributes of a grid.
Structure
<which grid>
0 = Y left axis
1 = Y right axis
2 = X axis
<major grid>
0 = none
1 = solid
2 = dashed
3 = dotted
<minor grid>
0 = none
1 = solid
2 = dashed
3 = dotted
<major tick>
0 = none
1 = in
2 = out
3 = both
<minor tick>
0 = none
1 = in
2 = out
3 = both
<major grid/tick color> x 4
<minor grid/tick color> x 4
Record Type 5 (0x05)
Chart Styles
Description
Contains information to define different chart styles.
Structure
<type of chart (entire chart)>
0 = bar chart
1 = line chart
2 = area chart
3 = scatter chart
4 = hi-lo chart
5 = mixed chart
6 = surface chart
7 = table chart
8 = pie chart
<style of chart>
0 = overlap chart
1 = cluster chart
2 = stacked chart
3 = 100% stacked chart
[table/surface options (bit fields)]
bit 0: single grid
bit 1: full grid
bit 2: use table colors
bit 3: outline surface patches
<hi-lo style>
0 = line
1 = bar
2 = error
3 = area
Record Type 6 (0x06)
Chart Sizes
Description
Defines the sizes, 1 (0x01)-100 (0x64), of the chart items. These values represent a percentage
of the total space available for the item. For example, if the bar width is 100 (0x64), the bars
would fill all the space and be touching each other.
Structure
<bar width>
<bar depth>
<overlap size>
<line height>
Record Type 7 (0x07)
Viewing Information
Description
Contains information pertaining to the view of the chart.
Structure
[view (bit fields)]
bit 0: three-dimensional
bit 1: axes at right angles
bit 2: horizontal
bit 3: show table with chart
bit 4: show data values
bit 5: place data values inside
eye point (X,Y,Z) x 3
up vector (X,Y,Z) x 3
X shear
Y shear
Record Type 8 (0x08)
Item Definition
Description
Defines each item (row).
Structure
[item # (row)]
<item type (for mixed charts)>
0 = bar item
1 = reserved
2 = line item
3 = area item
4 = scatter item
5 = hi-lo item
6 = reserved
7 = reserved
<axis type>
0 = Y axis left
1 = Y axis right
2 = X axis
<bar style (for bar items)>
0 = rectangle bar
1 = cylindrical bar
2 = pyramid bar
3 = octagonal bar
<marker style (for scatter items)>
0 = box
1 = triangle
2 = cross
3 = diamond
4 = asterisk
5 = circle
6 = sun
7 = 5 point star
8 = 6 point star
9 = wedge
10 = X
<2D line color> x 4
<2D line width>
<2D line style>
<flags>
bit 0: lines in line charts
bit 1: markers in line charts
bit 2: lines in scatter charts
bit 3: markers in scatter charts
<marker size>
[entity flags]
Record Type 9 (0x09)
Surface/Table Color Table
Description
Contains the color table for Surface/Table charts (10 colors).
Structure
<red intensity of color 1>
<green intensity of color 1>
<blue intensity of color 1>
<transparency value of color 1>
<red intensity of color 2>
<green intensity of color 2>
<blue intensity of color 2>
<transparency value of color 2>
..
..
..
<red intensity of color 10>
<green intensity of color 10>
<blue intensity of color 10>
<transparency value of color 10>
<table cell fill color> x 4
<table cell line color> x 4
<surface outline color> x 4
Note
The first 8 of the 10 color entries at the beginning of this record define bullet colors for levels 1-8.
Record Type 10 (0x0A)
Pie Information
Description
Contains pie chart information.
Structure
[pie # (column)]
[starting angle]
[tilt amount]
<3D depth, 1-100 (1-0x64)>
<pie size, 1-100 (1-0x64)>
<slice # to link>
<flags>
bit 0: column
bit 1: linked
bit 2: show slice labels
bit 3: sort slices large to small
<array of exploded distances (center point can range from 0-200)> x 24
Record Type 11 (0x0B)
Pie Style
Description
Contains pie style information.
Structure
<style (bit fields)>
bit 0: proportional pies
bit 1: stack pie labels
<value labels>
0 = in
1 = out
2 = none
<percentage labels>
0 = in
1 = out
2 = none
<label labels>
0 = in
1 = out
2 = none
<pointer style>
0 = none
1 = short
2 = medium
3 = long
Record Type 12 (0x0C)
Attribute Record
Description
Contains attribute record information.
Structure
<category (what these attributes apply to)>
0 = base
1 = frame
2 = row items
3 = text initial codes
4 = text box
5 = text chart highlight box
[sub-category]
(for row items)
row #
(for text initial codes and text box)
(for data charts)
0 = title
1 = sub-title
2 = Y1 axis title
3 = Y2 axis title
4 = X axis title
5 = legend
6 = all other (cell values, X-names, Y-axis labels..)
(for text chart highlight box)
0 = title level (first level)
1 = body (all other levels)
[attribute map]
bit 2: brush background color
bit 3: # of gradient colors/# of gradient steps/gradient color # 1/gradient color # 2
bit 4: gradient reference point (X)/gradient reference point (Y)
bit 5: gradient angle
bit 6: gradient type/gradient flag
bit 7: brush pattern
bit 8: reserved
bit 9: reserved
bit 10: pen background color
bit 11: pen foreground color
bit 12: pen horizontal width/pen vertical width
bit 13: pen pattern
bit 14: pen style
bit 15: line end style/line join style
<line end style (if bit 15 set>
<line join style (if bit 15 set)>
[pen style (if bit 14 set)]
[pen pattern (if bit 13 set)]
[pen horizontal width (if bit 12 set)]
[pen vertical width (if bit 12 set)]
<pen foreground color (if bit 11 set)> x 4
<pen background color (if bit 10 set)> x 4
[brush pattern (if bit 7 set)]
<gradient type (if bit 7 set)>
<gradient flag (if bit 6 set)>
[gradient angle (if bit 5 set)] x 2
[gradient reference point (X) (if bit 4 set)]
[gradient reference point (Y) (if bit 4 set)]
[# of gradient colors (if bit 3 set)]
[# of gradient steps (if bit 3 set)]
<gradient color # 1 (if bit 3 set)> x 4
<gradient color # 2 (if bit 3 set)> x 4
<brush background color (if bit 2 set)> x 4
Record Type 13 (0x0D)
Text Box Definition
Description
Defines text boxes.
Structure
<text type>
(for data charts)
0 = title
1 = sub-title
2 = Y1 axis title
3 = Y2 axis title
4 = X axis title
5 = legend
6 = cell values
(for organization charts)
0 = all
(for text charts)
0 = all
<text box style>
0 = rectangle
1 = rounded rectangle
2 = octagon
255 (0xFF) = none
<text box border style>
0 = none
1 = single line
2 = double line
3 = dotted line
4 = dashed line
5 = thick line
6 = shadow
7 = bevel
<text box border color> x 4
<flags>
(for bullet/organization charts)
None
Record Type 14 (0x0E)
Text Initial Codes
Description
Contains initial codes for various labels.
Structure
<text type>
(for data charts)
0 = title
1 = subtitle
2 = Y1 axis title
3 = Y2 axis title
4 = X axis title
5 = legend
6 = all other (cell values, X-names, Y-axis labels..)
(for organization charts)
0 = all text within a node
(for text charts)
None
[initial text attributes (bit fields)]
bit 7: outline
bit 8: italics
bit 9: shadow
bit 10: reserved
bit 11: double underline
bit 12: bold
bit 13: reserved
bit 14: underline
bit 15: small caps
[font cell height (3600ths), beginning of font descriptor]
[font optimal width (1200ths)]
[cap height (3600ths)]
[X height (3600ths)]
[descender height (3600ths)]
[italic adjustment (1200ths)]
<typeface descriptor> x 3
Low short integer:
bit 0: 1 casual
bit 1: 1 connected letters
bit 2: 1 decorative
bit 3: 1 formal
bit 4: 1 future
bit 5: 1 old style
bit 6: 1 script or calligraphic
bit 7: 1 cupped
bit 8: 1 exaggerated
bit 9: 1 hairline
bit 10: 1 slab
bit 11: 1 slanted
bit 12: 1 transitional
bit 13: 1 triangular
bit 14: 1 curved or bowed diagonals
bit 15: 1 non-connecting enclosures
High byte:
bit 0: 1 round
bit 1: 1 square
bit 2: 1 angular
bit 3: 1 exaggerated
bit 4: 1 uniform
bit 5: 1 ball terminals
bit 6: 1 tails
bit 7: 1 reserved; must = 0
<typeface definition flags (5.0, same as 5.1 flags without heavy, black, ultra-black)>
<hash of typeface name>
<font quality>
[hash of font name]
[character set completeness flags] x 2
Low Short Integer | High Short Integer | Meaning |
Bit n = | Bit n = | |
0 | 0 | charset not supported |
1 | 0 | charset supported 1%-25% |
0 | 1 | charset supported 26%-59% |
1 | 1 | charset supported 60%-100% |
[point size (5.1) (3600ths)]
<typeface definition flags (5.1), end of font descriptor>
bit 1: small caps font
bit 2: shadow font
bit 4: outline font
bit 8: italic or oblique
bit 16: PS font (font descriptor only)
Weight -- high three bits
00000000b extra light
00100000b light
01000000b normal
01100000b demi-bold
10000000b bold
10100000b heavy
11000000b black
11100000b ultra-black
[entity flags]
bit 14: fill
bit 15: reserved
bit 16: frame
Note
In the Character Set Completeness Flags field, the "n" in "Bit n =" equals the number of the
character set. For example, if you wanted to check the completeness of character set zero (the
ASCII character set), you would look at bit zero (0) of the low and high short integers.
Record Type 15 (0x0F)
Text/Box Position
Description
Contains position information for the various labels.
Structure
<text type>
0 = title
1 = sub-title
2 = Y1 axis title
3 = Y2 axis title
4 = X axis title
5 = legend
6 = cell values
<horizontal position>
0 = left
1 = center
2 = right
<vertical position>
0 = top
1 = middle
2 = bottom
<flags>
(for legend)
bit 0: If <text type> = 5, display legend
bit 1: If <text type> = 5, vertical shape
bit 2: If <text type> = 5, inside chart
0 For Y1 and Y2 axis titles: on side of axis
Record Type 16 (0x10)
Organizational Chart View
Description
Contains viewing information for the organizational chart.
Structure
<orientation>
0 = top to bottom
1 = bottom to top
2 = left to right
3 = right to left
<reserved>
<display levels>
0-9 = # of levels to display from top
<top level arrangement>
0 = single
1 = staggered
16 (0x10) = left
17 (0x11) = right
18 (0x12) = double
<middle level arrangement>
0 = single
1 = staggered
16 (0x10) = left
17 (0x11) = right
18 (0x12) = double
<last level arrangement>
0 = single
1 = staggered
16 (0x10) = left
17 (0x11) = right
18 (0x12) = double
Record Type 17 (0x11)
Organizational Chart Text/Box
Description
Contains rendition and position information for text and boxes.
Structure
<justification within box>
0 = left
1 = center
2 = right
<vertical alignment within box>
0 = top
1 = middle (only supported value in version 2.0)
2 = bottom
<box width (relative widths for all boxes)>
0 = large to small
1 = all the same
2 = fit text
<box height (relative heights for all boxes)>
0 = large to small
1 = all the same
2 = fit text
<box display flag (for complete chart)>
0 = don't display any boxes
1 = display top box only
2 = display top and middle boxes
3 = display all boxes
Record Type 18 (0x12)
Organizational Chart Connectors
Description
Contains information for rendering connectors.
Structure
<connector type>
0 = definition for complete chart
<connector style>
0 = right angles
1 = indirect
2 = direct
<staff connector line style (only three supported)>
1 = solid
3 = dashed
6 = dotted
<flags>
bit 0: show arrows
<connector line color> x 4
Record Type 19 (0x13)
Text Chart Highlight Box
Description
Contains rendition and position information for the highlight box.
Structure
<box type>
0 = title level (first level)
1 = body (all other levels)
2 = all (title and body)
3 = none
<box position>
0 = above
1 = behind
2 = below
3 = above/below
<flags>
bit 0: fit box to text
Record Type 20 (0x14)
Paragraph Definition
Description
Contains paragraph number definitions for bullet charts.
Structure
<reserved>
[new 8 level #s (same as WP5.1 paragraph definition)] x 8
<new 8 definitions, each definition is three bytes (same as WP5.1 paragraph definition)> x 24
2nd byte:
'I' = uppercase Roman
'i' = lowercase Roman
'A' = uppercase letter
'a' = lowercase letter
'1' = Arabic...
1st and 3rd bytes:
ASCII punctuation...
<new attach flag (bit fields)>
bit set = attach previous level
<new outline flag>
1 = tab to level of previous paragraph # (always set for version 2.0)
Note
On the first and third bytes of the New 8 Definitions field, spaces do not appear in paragraph
numbers. If the first byte is zero, the second and third bytes are characters to be used as bullets.
Record Type 21 (0x15)
Justification
Description
Contains justification information for bullet charts.
Structure
<flag (bit fields)>
bit 0: use justification below for level 1, else no justification
bit 1: use justification below for level 2, else no justification
bit 2: use justification below for level 3, else no justification
bit 3: use justification below for level 4, else no justification
<level 1 justification>
0 = left
1 = full
2 = center
3 = right
<level 2 justification (see level 1 for legal values)>
<level 3 justification (see level 1 for legal values)>
<level 4 justification (see level 1 for legal values)>
Record Type 22 (0x16)
X Name Information
Description
Structure
<flags>
bit 0: stagger
bit 1: display all ticks
[interval]
Record Type 23 (0x17)
Style Revision Number
Description
Contains the chart style format revision number. This record must follow the Start Chart record.
The current Chart Style format revision number is 1.1.
Structure
<major revision>
<minor revision>
Note
This revision number is not to be confused with an application revision number, such as
WordPerfect 6.0, nor is it to be confused with the WPG file format revision number. It is the
revision number of the Chart Style format.