A chart is a block of records that starts with a Chart record and ends
with EOF. A chart sheet is a Chart Sheet Substream of its own; a chart
embedded in a worksheet is the same block inside the sheet’s drawing records
(see drawing objects).
Records nest by Begin (0x1033) and End (0x1034) pairs, which have no data. Section
numbers are those of [MS-XLS] v20250819; integers are little-endian. Colours are
LongRGB (4 bytes: red, green, blue, 0) and IcvChart (2 bytes,
an index into the chart’s colour table, 0x004D being the automatic colour). Positions
and sizes are in SPRC unless said otherwise: 1/4000 of the chart’s width or height.
Record numbers
The chart records are numbered from 0x1001; they are listed with their numbers on Record types. The groups below follow the way the records nest: chart, then chart groups with their series and formats, then the axes, legend and text.
Chart, series and formats
| Record | Fields |
|---|---|
| Chart (0x1002, 2.4.45) | Opens the chart. x, y, dx, dy (4 each, FixedPoint from [MS-OSHARED]: the position of the upper-left corner and the size, in points; ignored when the chart is embedded in a sheet). |
| Units (0x1001, 2.4.332) | 2 bytes, zero, ignored. |
| Series (0x1003, 2.4.252) | Opens a series, a trendline or error bars. sdtX (2: 0x0001 the categories, or the horizontal values of bubble and scatter groups, are numbers; 0x0003 text), sdtY (2, 0x0001, ignored), cValx (2, count of categories or horizontal values, at most 32767), cValy (2, count of values), sdtBSize (2, 0x0001, ignored), cValBSize (2, count of bubble sizes). |
| SeriesText (0x100D, 2.4.254) | The text of a series name, trendline name or label, axis title or chart title: 2 reserved bytes, then stText, a ShortXLUnicodeString. |
| SeriesList (0x1016, 2.4.253) | cser (2) then rgiser: cser two-byte one-based indexes of Series records in the substream. |
| DataFormat (0x1006, 2.4.74) | Opens the formatting of a series or one data point. xi (2: the zero-based data point index, or 0xFFFF for the whole series; at most 31999, or 3999 with a Chart3d; 0xFFFF for a trendline or error bar), yi (2: the zero-based index of the Series record), iss (2: the plot order of the series if the group has no SerAuxTrend or SerAuxErrBar, otherwise the trendline number or the index of the series an error bar belongs to), then 2 bytes of which bit 0 fXL4iss must be 0. |
| ChartFormat (0x1014, 2.4.48) | Opens a chart group. 16 reserved zero bytes, then 2 bytes whose bit 0 is fVaried (the colour of each data point and the colour and type of each marker vary; ignored when the group has several series, or one series in a surface, stock or area group), then icrt (2: the drawing order of the group, 0 at the bottom; unique, at most 9). |
Lines, markers and fills
LineFormat (0x1007, 2.4.156)
The appearance of a line: rgb (4, LongRGB), lns (2: 0 solid, 1 dash, 2 dot, 3 dash-dot, 4 dash dot-dot, 5 none, 6 dark gray pattern, 7 medium gray, 8 light gray), we (2, signed: 0xFFFF hairline, 0 single, 1 double, 2 triple), a flag word and icv (2, IcvChart; it must match rgb). Flag bits: 0 fAuto (default formatting; lns, we, icv and rgb are then ignored), 1 reserved, 2 fAxisOn (the axis line is displayed; it matters when the previous record is an AxisLine with id 0, where fAxisOn 0 with lns 5 means no axis line), 3 fAutoCo (1 exactly when icv is 0x004D), 4–15 reserved. With lns 5 the thickness is 0xFFFF and the colour 0x004D.
MarkerFormat (0x1009, 2.4.160)
The data markers of line, radar and scatter groups: rgbFore (4, border colour), rgbBack (4, interior colour), imk (2: 0 none, 1 square, 2 diamond, 3 triangle, 4 square with X, 5 square with asterisk, 6 short bar, 7 long bar, 8 circle, 9 square with plus), a flag word, icvFore (2), icvBack (2) and miSize (4: the size in twips, 40 to 1440, default 100). Flag bits: 0 fAuto (type, size and colour are automatic; the default), 1–3 reserved, 4 fNotShowInt (no interior), 5 fNotShowBrd (no border), 6–15 reserved.
AreaFormat (0x100A, 2.4.3)
The pattern and colours of a filled region: rgbFore (4), rgbBack (4, default 0xFFFFFF), fls (2, default 1), a flag word, icvFore (2) and icvBack (2, default 0x0009). Flag bits: 0 fAuto (the fill colours are automatic; default 1), 1 fInvertNeg (foreground and background swap for negative values; only for data points of bar and column groups), 2–15 reserved. fls values: 0 none (overrides any colour), 1 solid (only rgbFore is drawn), 2 medium gray, 3 dark gray, 4 light gray, 5 horizontal stripes, 6 vertical stripes, 7 downward diagonal stripes, 8 upward diagonal stripes, 9 grid, 0x0A trellis, 0x0B light horizontal stripes, 0x0C light vertical stripes, 0x0D light down, 0x0E light up, 0x0F light grid, 0x10 light trellis, 0x11 grayscale 1/8, 0x12 grayscale 1/16. For any value other than 0 and 1 the next record must be a GelFrame, whose fill type must be the pattern fill of [MS-ODRAW] and which names the exact hatch (for example 50, 60, 70, 75, 80 or 90 percent for the gray kinds).
PieFormat (0x100B, 2.4.195)
pcExplode (2, signed, at least 0): how far the data point or series sits from the centre of the plot area of a pie or doughnut group, or of the primary pie of a pie of pie or bar of pie group. 0 is as close as possible, 100 is the edge of the chart area; above 100 all points scale down so that the largest fits the edge. Not allowed on other group types, on doughnut series other than the outermost, or on the secondary bar of a bar of pie.
Chart group types
Each ChartFormat holds exactly one record naming the group type, which also carries the group’s attributes.
| Record | Fields |
|---|---|
| Bar (0x1017, 2.4.15) | A bar group (horizontal) or column group (vertical). pcOverlap (2, signed, –100 to 100: negative is the separation between points, positive the overlap), pcGap (2, at most 500: the gap between categories and between the plot area edges, as a percentage of the point width), then flags: 0 fTranspose (1 horizontal bars), 1 fStacked, 2 f100 (shown as percentages; 0 unless stacked), 3 fHasShadow, 4–15 reserved. |
| Line (0x1018, 2.4.155) | Flags (2): 0 fStacked, 1 f100, 2 fHasShadow, 3–15 reserved. |
| Pie (0x1019, 2.4.194) | anStart (2: starting angle of the first point, clockwise from the top, at most 360), pcDonut (2: 0 a pie group, 10 to 90 a doughnut group with that hole size as a percentage of the plot area), flags: 0 fHasShadow, 1 fShowLdrLines (leader lines to the data labels), 2–15 reserved. |
| Area (0x101A, 2.4.2) | Flags (2): 0 fStacked, 1 f100, 2 fHasShadow, 3–15 reserved. |
| Scatter (0x101B, 2.4.243) | pcBubbleSizeRatio (2, 0 to 300: the size of the points as a percentage of the default; ignored unless bubbles), wBubbleSize (2: 1 the area of the point represents the value, 2 the width), flags: 0 fBubbles (a bubble group rather than a scatter group), 1 fShowNegBubbles, 2 fHasShadow, 3–15 reserved. |
| Radar (0x103E, 2.4.212) | Flags (2): 0 fRdrAxLab (category labels are shown), 1 fHasShadow, then reserved bits; then 2 unused bytes. |
| RadarArea (0x1040, 2.4.213) | A filled radar group; the same layout as Radar. |
| Surf (0x103F, 2.4.272) | Flags (2): 0 fFillSurface (1 filled, 0 wireframe), 1 f3DPhongShade, 2–15 reserved. |
| BopPop (0x1061, 2.4.25) | A bar of pie or pie of pie group. pst (1: 1 pie of pie, 2 bar of pie), fAutoSplit (1, Boolean: the split is chosen by the application), split (2: 0 by position, 1 by value, 2 by percent, 3 custom, given by a following BopPopCustom), iSplitPos (2, signed, 0 to 32000: how many points, counted from the end of the series, go to the secondary pie or bar), pcSplitPercent (2: points below this percentage of the series total go to the secondary; with split 2), pcPie2Size (2: size of the secondary as a percentage of the primary, from 5), pcGap (2, 0 to 500: the distance between them, 500 being 250% of the average width), numSplitValue (8, Xnum: the threshold with split 1; points below it go to the secondary), then flags: 0 fHasShadow, 1–15 reserved. |
| BopPopCustom (0x1067, 2.4.26) | After a BopPop with split 3. cxi (2: the number of data points plus one), then rggrbit, 1 + floor(cxi / 8) bytes of one bit per data point (1 secondary, 0 primary). The padding is in the most significant bits of the first byte; the next bit down is the first data point, and so on, the most significant bit of each following byte continuing the series. The least significant bit of the last byte is an extra bit: when 1, the secondary contains no points. |
| Chart3d (0x103A, 2.4.46) | The 3-D scene of the plot area; follows a bar, pie, line, area or surface group record. anRot (2, signed, 0 to 360 degrees: rotation about the vertical axis; at most 44 for horizontal bars), anElev (2, signed, –90 to 90: rotation about the horizontal axis; 0 to 44 for horizontal bars and at least 0 for pie), pcDist (2, signed, below 200: the field of view angle), pcHeight (2: the thickness of a pie when fNotPieChart is 0; otherwise the height as a percentage of the width, 5 to 500), pcDepth (2, 1 to 2000: depth as a percentage of the width), pcGap (2, at most 500: the gap between series and the front and back edges), flags: 0 fPerspective (vanishing point, uses pcDist), 1 fCluster (clustered bars), 2 f3DScaling (height chosen automatically; 0 for pie), 3 reserved, 4 fNotPieChart (0 for a pie group), 5 fWalls2D (walls drawn in 2-D and floor omitted; for bar and area groups only), 6–15 reserved. |
| Chart3DBarShape (0x105F, 2.4.47) | Ignored unless the substream has a Chart3d and the group is bar or column. riser (1: 0 a rectangular base, 1 an elliptical base), taper (1: 0 no taper; 1 tapers to a point at the value; 2 tapers towards a projected point at the maximum of all values, clipped at the point’s own value). |
| CrtLine (0x101C, 2.4.68) | Followed by a LineFormat. id (2: 0 drop lines below points of line, area and stock groups; 1 high-low lines; 2 series lines joining stacked bars or the primary pie to the secondary of a bar of pie; 3 leader lines with non-default formatting for pie and pie of pie groups). Each id appears once, in increasing order. |
| DropBar (0x103D, 2.4.92) | The up bars and then the down bars between the series of a line group with more than one series; opens a collection of records (the first is the up bars). pcGap (2, signed, 0 to 500: the gap between the bars). |
Data labels and legend
| Record | Fields |
|---|---|
| AttachedLabel (0x100C, 2.4.5) | What a data label of a group, series or data point shows. Flag bits: 0 fShowValue (the value, or the vertical value in bubble and scatter groups), 1 fShowPercent (the percentage of the series total; pie, doughnut, bar of pie and pie of pie only), 2 fShowLabelAndPerc (the category name and the percentage; the same group types), 3 unused, 4 fShowLabel (the category or horizontal value; the series name in an area group), 5 fShowBubbleSizes (bubble groups only), 6 fShowSeriesName, 7–15 reserved. In a group-level record these are mutually restricted: with fShowLabelAndPerc set, fShowPercent must be set and fShowValue clear; fShowLabel must be 0 when fShowValue is 1; fShowBubbleSizes must be 0 when percent, value or label is set; fShowSeriesName must be 0 when any other is set. |
| Legend (0x1015, 2.4.152) | Opens the legend; without it the chart has none. x, y, dx, dy (4 each: SPRC position and size, ignored; the following Pos record’s values are used), unused (1), wSpace (1, must be 1: 40 twips between entries), flags: 0 fAutoPosition (needs fAutoPosX and fAutoPosY), 1 reserved (1), 2 fAutoPosX, 3 fAutoPosY, 4 fVert (1 one column of entries; must be 1 if fWasDataTable), 5 fWasDataTable (the legend is shown in a data table), 6–15 reserved. |
Axis groups and axes
| Record | Fields |
|---|---|
| AxesUsed (0x1046, 2.4.10) | cAxes (2): 1 a primary axis group only, 2 a primary and a secondary group. It is 1 when the chart has no chart groups. |
| AxisParent (0x1041, 2.4.13) | Opens an axis group. iax (2: 0 primary, 1 secondary; the first AxisParent has 0, the second 1), then 16 unused bytes. (Its position and size come in the Pos record that follows.) |
| Axis (0x101D, 2.4.11) | Opens an axis. wType (2: 0 the horizontal value axis of a scatter or bubble group, or the category axis of any other group; 1 the vertical value axis of scatter and bubble groups, or the value axis of others; 2 a series axis; the first axis of a group has 0, the second 1, the third 2), then 16 reserved zero bytes. |
| CatSerRange (0x1020, 2.4.39) | A category, date or series axis. catCross (2, signed: the category where the value axis crosses, 1 or more; for a date axis it must equal catCrossDate of the AxcExt minus catMin plus 1; ignored with fMaxCross), catLabel (2, 1 to 31999: the interval between labels; ignored on a date axis), catMark (2, 1 to 31999: tick marks appear only at multiples of this; ignored on a date axis), flags: 0 fBetween (the value axis crosses between tick marks, not on one), 1 fMaxCross (crosses at the last category, series or maximum date), 2 fReverse (drawn in reverse order), 3–15 reserved. |
| AxcExt (0x1062, 2.4.9) | The date-axis properties that go with a CatSerRange. catMin, catMax (2 each: the minimum and maximum date in the workbook’s date system, in units of duBase; ignored when automatic), catMajor (2) with duMajor (2), catMinor (2) with duMinor (2), duBase (2, the smallest unit), catCrossDate (2: where the value axis crosses), then flags: 0 fAutoMin, 1 fAutoMax, 2 fAutoMajor, 3 fAutoMinor, 4 fDateAxis, 5 fAutoBase, 6 fAutoCross, 7 fAutoDate (the axis becomes a date axis when its data is dates), 8–15 reserved. Each date unit field is a DateUnit: 0 days, 1 months, 2 years. |
| ValueRange (0x101F, 2.4.341) | A value axis. numMin, numMax, numMajor, numMinor, numCross (8 each, Xnum: the minimum below the maximum, the major interval at least the minor, the value where the other axes cross), then flags: 0 fAutoMin, 1 fAutoMax, 2 fAutoMajor, 3 fAutoMinor, 4 fAutoCross (each 1 means the matching number is calculated and ignored), 5 fLog (logarithmic scale; base 10 unless a CrtMlFrt follows with an XmlTkLogBaseFrt), 6 fReversed, 7 fMaxCross (the other axes cross at the maximum; fAutoCross and numCross are then ignored), 8–15 unused. |
| Tick (0x101E, 2.4.327) | Labels and tick marks of an axis. tktMajor (1) and tktMinor (1): 0 none, 1 inside (towards the plot area), 2 outside, 3 crossing. tlt (1): label position, 0 none, 1 low (left of or below the plot area), 2 high, 3 next to the axis. wBkgMode (1: 1 transparent, 2 opaque in the colour of the rgbBack of the axis’s AreaFormat; ignored when fAutoMode), rgb (4: the label colour), flags (2): 0 fAutoCo (automatic text colour), 1 fAutoMode (background follows DefaultText), 2–4 rot (0 use trot, 1 stacked top to bottom with upright letters, 2 rotated 90 degrees counterclockwise, 3 rotated 90 clockwise), 5 fAutoRot (the rotation follows the axis position; rot and trot ignored), 6–13 unused, 14–15 iReadingOrder (0 as the nearest preceding Text record that is not 0 or else DefaultText, 1 left to right, 2 right to left). Then icv (2, the same colour as rgb), trot (2: 0 to 90 degrees counterclockwise, 91 to 180 clockwise by trot minus 90, 255 top to bottom with upright letters). |
| AxisLine (0x1021, 2.4.12) | Says which part the following LineFormat formats. id (2: 0 the axis line, 1 major gridlines, 2 minor gridlines, 3 the walls or floor of a 3-D chart; each id once per axis, in increasing order). With 3 the preceding Axis has wType 0 for the walls or 1 for the floor. |
Text, frames and position
| Record | Fields |
|---|---|
| Pos (0x104F, 2.4.201) | The position and size of a legend, an attached label or the plot area (of the primary axis group; ignored for the plot area when fManPlotArea of ShtProps is 1). mdTopLt and mdBotRt (2 each, PositionMode: 0 MDFX relative to the chart, in points; 1 MDABS absolute width and height in points, only for mdBotRt; 2 MDPARENT, the owner of the record decides; 3 MDKTH an offset to the default position in 1/1000 of the plot area; 5 MDCHART relative to the chart, in SPRC), then x1, unused1, y1, unused2, x2, unused3, y2, unused4 (2 each, the four values signed). Valid pairs: plot area MDPARENT/MDPARENT (x1, y1 the offset of the upper-left corner of the primary axis group in SPRC, x2, y2 its size); legend MDCHART/MDABS (x1, y1 the corner in SPRC, x2, y2 the size); legend MDCHART/MDPARENT (the size is automatic, x2 and y2 ignored); legend MDKTH/MDPARENT (all four ignored: the legend is inside a data table); attached label MDPARENT/MDPARENT, where x1 and y1 are an offset from the default position: for a chart title in SPRC; for an axis title along the axes in 1/1000 of the axis length; for a data label of a non-pie, non-radar group along the axes in 1/1000 of the axis length (y1 opposite to the value axis direction); for a pie group x1 is a clockwise angle in degrees and y1 a radius offset in 1/1000 of the pie radius (negative towards the centre); for a radar group a horizontal and vertical offset in 1/1000. |
| Text (0x1025, 2.4.324) | Opens an attached label (title, axis title, data label, legend text). at (1: horizontal alignment, 1 left, 2 centre, 3 right, 4 justify, 7 distributed), vat (1: vertical, 1 top, 2 centre, 3 bottom, 4 justify, 7 distributed), wBkgMode (2: 1 transparent, 2 opaque), rgbText (4), x, y, dx, dy (4 each, signed, SPRC of the chart area; x and y are ignored after a DefaultText or before a Pos, dx and dy before a Pos; otherwise 0 to 32767), a flag word, icvText (2), a second word and trot (2: 0 to 90 degrees counterclockwise, 91 to 180 clockwise by trot minus 90, 255 top to bottom upright). First flag word, from bit 0: fAutoColor, fShowKey (attached to a legend key), fShowValue, unused, fAutoText (the text is generated), fGenerated, fDeleted (the user deleted this data label), fAutoMode (the background follows the defaults), unused (3 bits), fShowLabelAndPerc, fShowPercent, fShowBubbleSizes, fShowLabel, reserved. The show flags mean what they do in AttachedLabel, and are only valid when the label’s ObjectLink has wLinkObj 4 and links a series; where a DataLabExtContents record is present they must agree with its flags. Second word: bits 0–3 dlp (the data label position, below), bits 4–13 unused, bits 14–15 iReadingOrder (0 as the nearest preceding Text after a Chart, DataFormat, Legend, Series or YMult record that is not 0, else DefaultText; 1 left to right; 2 right to left). dlp is 0 for text that is not a data label. For data labels: 0 auto for pie, right for line, bubble and scatter, outside for unstacked bar and column, centre for stacked; 1 outside end (bar, column, pie); 2 inside end (bar, column, pie); 3 centre (bar, column, line, bubble, scatter, pie); 4 inside base (bar, column); 5 above, 6 below, 7 left (line, bubble, scatter). |
| DefaultText (0x1024, 2.4.88) | id (2): which Text records the following Text record sets the defaults for. Within a chart group (CRT) the value is 0 or 1: 0 means the Text records of the group where fShowPercent or fShowValue is 0, 1 those where either is 1. Elsewhere it is 2 or 3: 2 means all Text records in the chart whose FontInfo has fScaled 0, and 3 those with fScaled 1. |
| ObjectLink (0x1027, 2.4.182) | Links a Text record to a chart object. wLinkObj (2: 1 the entire chart, 2 the value axis or the vertical value axis of a scatter or bubble group, 3 the category axis or horizontal value axis, 4 a series or data points, 7 the series axis, 0x0C the display units label of an axis), wLinkVar1 (2: the zero-based Series index when wLinkObj is 4, at most 254; otherwise ignored), wLinkVar2 (2: with wLinkObj 4, 0xFFFF for a series or the data point index, at most 31999; otherwise ignored). |
| FontX (0x1026, 2.4.123) | iFont (2): the font for the following text. 0 is the chart’s default font; up to the number of Font records in the Globals substream it is a one-based index there; above that it is a one-based index (minus that number) into the Font records that follow the FrtFontList in this substream. |
| IFmtRecord (0x104E, 2.4.143) | ifmt (2): the number format of an axis’s labels (an IFmt, see Cells and rows). |
| Frame (0x1032, 2.4.128) | The frame around a chart element. frt (2: 0 a frame, 4 a frame with a shadow), then flags: 0 fAutoSize (the size is calculated, the element’s width and height ignored), 1 fAutoPosition (the position is calculated), 2–15 reserved. |
| PlotArea (0x1035, 2.4.197) | Empty; the Frame that follows is the plot area’s. |
| PlotGrowth (0x1064, 2.4.198) | dxPlotGrowth and dyPlotGrowth (4 each, FixedPoint: the horizontal and vertical growth of the plot area in points, used for scaling fonts together with the Fbi records whose scab is 1). |
| ShtProps (0x1044, 2.4.261) | Flags (2): 0 fManSerAlloc (series are allocated manually), 1 fPlotVisOnly (plot visible cells only), 2 fNotSizeWith (do not size with the window), 3 fManPlotArea (must be 1 if fAlwaysAutoPlotArea is 1; otherwise ignored), 4 fAlwaysAutoPlotArea (0 use the default plot area dimension, 1 use that of the Pos record), 5–7 reserved; then mdBlank (1: 0 empty cells are not plotted, 1 as zero, 2 interpolated) and 1 reserved byte. |
| SerToCrt (0x1045, 2.4.256) | id (2): the zero-based index of the ChartFormat (chart group) that holds the current series. |
| SerParent (0x104A, 2.4.255) | series (2): the one-based index (1 to 0xFE) of the Series a trendline or error bar belongs to. |
| SBaseRef (0x1048, 2.4.242) | ref (8, Ref8U): where the PivotTable view the chart refers to is on its sheet. |
Series data, trendlines, error bars and legend entries
| Record | Fields |
|---|---|
| BRAI (0x1051, 2.4.29) | A reference to the data of a part of a series. id (1: 0 the series, legend entry or trendline name; 1 the values, or the horizontal values of bubble and scatter groups, and error bars; 2 the categories, or vertical values of bubble and scatter groups; 3 the bubble sizes), rt (1: 0 generated automatically, 1 the text or value given by formula, 2 a range of cells given by formula), a flag word (bit 0 fUnlinkedIfmt: 1 means the custom number format ifmt is used instead of the referenced cells’; bits 1–15 reserved), ifmt (2, an IFmt) and formula (a ChartParsedFormula: cce then the formula bytes; see Formulas). |
| SIIndex (0x1065, 2.4.262) | numIndex (2): what the Number records that follow hold: 1 series values (or vertical values of scatter and bubble groups), 2 category labels (or horizontal values), 3 bubble sizes. |
| SerAuxTrend (0x104B, 2.4.250) | A trendline. regt (1: 0 polynomial, 1 exponential, 2 logarithmic, 3 power, 4 moving average), ordUser (1: the polynomial order 2 to 6 or the moving-average period, 2 up to the series’s cValx minus 1), numIntercept (8, a ChartNumNillable: where the line crosses the value axis; a NilChartNum with type 0x0100 when not set), fEquation (1, Boolean: the equation is shown in the label), fRSquared (1, Boolean: R-squared is shown), numForecast (8, Xnum: periods to forecast forward), numBackcast (8, Xnum: periods backward). Both Booleans are ignored for a moving average, or if the label has its own SeriesText. The record stores only these flags: the text of the equation and of R-squared is not in the file, a reader computes it from the data (the specification gives no formula or number format for it). The viewer on this site passes the two flags on but draws no equation text. |
| SerAuxErrBar (0x105B, 2.4.249) | Error bars. sertm (1: 1 horizontal plus, 2 horizontal minus, 3 vertical plus, 4 vertical minus), ebsrc (1: 1 percentage, 2 fixed value, 3 standard deviation, 4 custom, 5 standard error), fTeeTop (1, Boolean: T-shaped), 1 reserved byte (1), numValue (8, Xnum: the fixed value, percentage or number of deviations; ignored for 4 and 5), cnum (2: the number of custom values or cell references; ignored unless ebsrc is 4). Custom values come from the closest preceding BRAI with id 1: if its formula has cce 0 they are an array stored in Number records in the series data (cell.col the zero-based index of the preceding Series, cell.rw the index in the array), otherwise a range. |
| SerFmt (0x105D, 2.4.251) | Flags (2): 0 fSmoothedLine (smooth lines on scatter, radar and line groups), 1 f3DBubbles, 2 fArShadow (markers have a shadow), 3–15 reserved. Applies to the preceding DataFormat; all default 0. |
| LegendException (0x1043, 2.4.153) | A legend entry that differs from the default; opens a collection. iss (2: 0xFFFF when the legend has an entry per series and trendline, in which case the entry is that of the series or trendline containing the record; otherwise the zero-based index of the entry, 0 being the first data point or, for surface groups, the lowest band), flags: 0 fDeleted, 1 fLabel (the entry was formatted: an attached label follows), 2–15 reserved. |
| AlRuns (0x1050, 2.4.1) | Rich text formatting in titles, trendline labels and data labels. cRuns (2, 3 to 256) then rgRuns, that many FormatRun structures (see Strings and the SST). |
| Dat (0x1063, 2.4.73) | Opens a data table shown in the chart. Flags (2): 0 fHasBordHorz (horizontal borders), 1 fHasBordVert (vertical borders), 2 fHasBordOutline (outline), 3 fShowSeriesKey (the legend key next to the series name), 4–15 reserved. |
| ClrtClient (0x105C, 2.4.50) | A custom colour palette: ccv (2, signed, must be 3) then rgColor, that many LongRGB values. The three entries are fixed: 0 the foreground colour (the system window text colour), 1 the background (the system window colour), 2 neutral (black). |
| Fbi (0x1060, 2.4.109) | Records the font size at the moment a scalable font was added. dmixBasis, dmiyBasis (2 each, 0 to 0x7FFF: the chart width and height in twips when the font was first applied), twpHeightBasis (2, 20 to 8180: the default font height in twips), scab (2: 0 scale by chart area, 1 by plot area), ifnt (2, FontIndex; used when it is 255 or less). If the scaled size equals the Font record’s dyHeight that font is used, else a Font is added. The algorithm: take the chart area at 96 dpi converted to twips (dmix, dmiy); for plot-area scaling apply PlotGrowth’s values divided by 65536; scale twpHeightBasis by dmix / dmixBasis and by dmiy / dmiyBasis; take the smaller (at least 10), round to a quarter point; if the basis is 160 to 240 and the result 120 to 160 use 160, and if it is 240 to 280 use 240. |
| Fbi2 (0x1068, 2.4.110) | The same fields as Fbi; ifnt is used when it is above 255. |
| GelFrame (0x1066, 2.4.131) | The properties of a fill pattern: two OfficeArt property tables, OPT1 an OfficeArtFOPT and OPT2 an OfficeArtTertiaryFOPT ([MS-ODRAW] 2.2.9 and 2.2.11), restricted to the fill properties of [MS-ODRAW] 2.3.7 (fill type, colour, opacity, back colour, blip, size, angle, focus, rectangle, shade colours and type, origin, and the boolean flags) in OPT1, and the extended colours (fillColorExt, fillColorExtMod, fillBackColorExt, fillBackColorExtMod, fRecolorFillAsPicture, fUseShapeAnchor) in OPT2. |
| PicF (0x103C, 2.4.193) | The layout of a picture fill. ptyp (2: 1 stretched to fit the filled area, 2 stacked in the direction of the value axis, 3 stacked and scaled to numScale axis units; outside a series format it must be 1), 2 unused bytes, a flag word holding fTopBottom (covers the top and bottom faces), fBackFront (front and back faces of bar and column points) and fSide (side faces), with one reserved bit and 4 further reserved bits (the spec’s bit order is not shown in its text; each flag must be 1 when there is no Chart3d, or the series has a Chart3DBarShape with riser 1), then numScale (8, Xnum, ignored unless ptyp is 3). |
| CrtLink (0x1022, 2.4.69) | 10 unused bytes; written and ignored. |
Future records: blocks, objects and newer chart features
Features Excel 2002 and later added to charts are stored as Future Records: records
numbered 0x0850 and up that an older reader can skip and keep. They begin with an
FrtHeaderOld (4 bytes: rt, 2 flag bytes) or an FrtHeader (12 bytes, see
workbook settings). The
chart-specific ones are numbered 0x0800 to 0x08FF (2048 to 2303).
| Record | Fields |
|---|---|
| ChartFrtInfo (0x0850, 2.4.49) | The application versions that made and last saved the chart, and the Future Record types used. frtHeaderOld (4), verOriginator (1) and verWriter (1) (each 0x9, 0xA, 0xC, 0xE or 0xF, naming a version of Excel), cCFRTID (2: the count, which depends on verWriter; 1 for 0x9, 3 for 0xA) then rgCFRTID, that many pairs (first, last) of record numbers: for 0x9 one range, 0x0850 to 0x085A; for 0xA also 0x0861 and 0x086A to 0x086B. It comes before the first chart-specific future record (before the page setup records when a CrtMlFrt exists). |
| FrtWrapper (0x0851, 2.4.130) | Wraps an ordinary record so that it can sit inside a StartObject block: frtHeaderOld (4), wrappedRecord (a Font, Continue, LineFormat, AreaFormat, SeriesText, DefaultText, Text, FontX, ObjectLink, Frame, Begin, End, PicF, Pos, AlRuns, BRAI, Fbi or GelFrame, whole with its own header) and zero padding to make the wrapper at least 12 bytes (8 minus the wrapped size when that is under 8). Records inside a StartObject and EndObject pair must be wrapped. |
| StartBlock (0x0852, 2.4.266) | Opens a collection of future records, nestable up to 100 levels, closed by an EndBlock. frtHeaderOld (4), iObjectKind (2: 0x0000 axis group, 0x0002 attached label, 0x0004 axis, 0x0005 chart group, 0x0006 Dat, 0x0007 Frame, 0x0009 legend, 0x000A LegendException, 0x000C series, 0x000D sheet, 0x000E DataFormat, 0x000F DropBar), iObjectContext, iObjectInstance1, iObjectInstance2 (2 each; the combination names the object, for example kind 0x0000 with instance1 0 and 1 are the primary and secondary axis groups, kind 0x0004 with instance1 0 to 3 the category axis, value axis, series axis and horizontal value axis of a scatter group, kind 0x0005 the chart group of the axis group iax, kind 0x0007 with context 1 the plot area and 2 the chart area, kind 0x0009 with context 0 the data table’s legend and 1 the chart’s, kind 0x000C with context the series index, kind 0x000E with context the series index and instance1 the data point or 0xFFFF for the series, kind 0x000F instance1 0 the up bars and 1 the down bars). Before a chart-specific future record the writer must open the blocks that enclose it, outermost first (sheet 0x000D, then Dat, series, DataFormat, LegendException, axis group, chart group, axis, DropBar, legend and so on), unless a StartObject is open. |
| EndBlock (0x0853, 2.4.100) | Closes a StartBlock; each block is closed just before the End record of the structure it was opened in. Same frtHeaderOld, iObjectKind, and the three context fields as the matching StartBlock. |
| StartObject (0x0854, 2.4.267) | Opens a collection that holds one future feature so that an older application can keep it; nestable up to 100 levels. frtHeaderOld (4), iObjectKind (2: 0x0010 the display units labels of the axis, i.e. YMult and what follows; 0x0011 an FrtFontList with its Font and Fbi records; 0x0012 a DefaultText followed by an attached label with DataLabExt), then optional unused1, unused2, unused3 (2 each). |
| EndObject (0x0855, 2.4.101) | frtHeaderOld (4), iObjectKind (2: equal to the StartObject’s; 0x0010 YMult, 0x0011 FrtFontList, 0x0012 DataLabExt), then optional unused words. |
| CatLab (0x0856, 2.4.38) | Axis label attributes. frtHeaderOld (4), wOffset (2: the distance between axis and label as a percentage of the default, which is a third of the font height in pixels; 0 to 1000), at (2: 1 top-aligned if the axis text’s trot is not 0, else left (left to right reading) or right; 2 centred; 3 bottom-aligned if trot is not 0, else right or left), flags: 0 cAutoCatLabelReal (1: the interval between labels is automatic; 0: catLabel of CatSerRange is used), 1–15 unused; then optional unused and reserved words. |
| YMult (0x0857, 2.4.356) | The value multiplier (display units) of a value axis; opens a collection. frtHeaderOld (4), axmid (2, signed: –1 custom, in numLabelMultiplier; 0 times 1; 1 times 100; 2 times 1000; 3 times 10,000; 4 times 100,000; 5 times 1,000,000; 6 times 10,000,000; 7 times 100,000,000; 8 times 1,000,000,000; 9 times 1,000,000,000,000), numLabelMultiplier (8, Xnum, above 0, ignored unless axmid is –1), flags: 0 reserved (1), 1 fAutoShowMultiplier (the display units label is shown), 2 fBeingEditted (the label is being edited); remaining bits reserved. |
| SXViewLink (0x0858, 2.4.316) | The PivotTable a pivot chart belongs to: rt (2), 2 unused, 2 reserved, cch (1: characters), stPivotTable (an XLUnicodeStringNoCch, case-sensitive name of the PivotTable view). |
| PivotChartBits (0x0859, 2.4.196) | rt (2), 2 unused, a flag word (bit 0 fGXHide: hide the pivot field captions in the chart; 15 bits unused), then three optional reserved words (0). |
| FrtFontList (0x085A, 2.4.129) | Fonts used by new chart elements; opens a collection of Font records. frtHeaderOld (4), verExcel (1: 0x09, fonts for display units labels; 0x0A, fonts for extended data labels; equal to iObjectInstance1 of the StartObject that follows), cFont (2) and rgFontInfo, cFont FontInfo structures. |
| DataLabExt (0x086A, 2.4.75) | Opens an extended data label: frtHeader (12). |
| DataLabExtContents (0x086B, 2.4.76) | frtHeader (12), flags: 0 fSerName (the series name), 1 fCatName (the category name, or the horizontal value in bubble and scatter groups), 2 fValue (the value, or the vertical value), 3 fPercent (percentage of the series total; pie-type groups only), 4 fBubSizes (bubble groups only), 5–15 reserved; then rgchSep, an XLUnicodeStringMin2 placed between the values. A matching Text record’s show flags must agree with these. |
| CrtLayout12 (0x089D, 2.4.66) | The layout of an attached label or a legend. frtHeader (12), dwCheckSum (4: a XOR over the Pos record’s x1 and y1 and, for a label, whether it is at its default position (1 when dlp is 0xA), for a legend also the other layout values and fAutoSize of its Frame; if it does not match, the layout is ignored), a flag word (one unused bit, autolayouttype in 4 bits: 0 align to the bottom, 1 top right corner, 2 top, 3 right, 4 left; ignored for labels), wXMode, wYMode, wWidthMode, wHeightMode (2 each, CrtLayout12Mode), then x, y, dx, dy (8 each, Xnum). The legend size in pixels is dx / 4000 and dy / 4000 of the chart area. |
| CrtLayout12A (0x08A7, 2.4.67) | The layout of a plot area. frtHeader (12), dwCheckSum (4), flags (bit 0 fLayoutTargetInner: 0 the outer plot area including axis labels, titles and data table, 1 the inner area bounded by the axes), xTL, yTL (2 each, signed, SPRC: the upper-left corner), xBR, yBR (2 each: the width and height), the four modes (2 each) and x, y, dx, dy (8 each, Xnum). |
| CrtLayout12Mode | 0 L12MAUTO (the application decides; the numbers are ignored); 1 L12MFACTOR (x, y the offset from the default position as a fraction of the chart area, –1.0 to 1.0; dx, dy the size as a fraction, 0 to 1); 2 L12MEDGE (x, y the upper-left corner and dx, dy the lower-right corner, relative to the chart area’s upper-left corner as fractions, 0 to 1). |
| CrtMlFrt (0x089E, 2.4.70) | Extra properties of a chart element as a chain of XmlTk structures. frtHeader (12), cb (4: the size of the chain including continuations, at most 0x7FFFFFEB), xmltkChain, then 4 unused bytes. Data beyond 8224 bytes goes in CrtMlFrtContinue records. May be ignored without losing more than the extra properties. |
| CrtMlFrtContinue (0x089F, 2.4.71) | frtHeader (12) then the next bytes of the chain. |
| ShapePropsStream (0x08A4, 2.4.258) | Shape formatting as XML ([ECMA-376] Part 1, 21.2.2.197), a superset of LineFormat, AreaFormat, MarkerFormat and GelFrame. frtHeader (12), wObjContext (2: the element; in an axis: 0 the axis, 1 major gridlines, 2 minor gridlines, 3 walls or floor; at the end of a chart group: 0 drop lines, 1 high-low lines, 2 leader lines, 3 series lines; in a series format: 0 the series, data points, error bars or trendline, 1 the data markers; in a frame or drop bar: 0), 2 unused, dwChecksum (4: a checksum of the shape properties by the algorithm of [MS-OSHARED] 2.4.3.2 over the LineFormat, AreaFormat, MarkerFormat and GelFrame data), cb (4) and rgb (cb ANSI characters of XML). If the checksum does not match, the XML is stale and the old records are used. |
| TextPropsStream (0x08A5, 2.4.325) | Extra text properties as XML ([ECMA-376] 21.2.2.216) for the whole chart, the legend, a legend entry, an attached label or an axis’s labels, a superset of the Text and Font records. frtHeader (12), dwChecksum (4, same scheme), cb (4), rgb (ANSI XML). A mismatching checksum means the XML is stale. |
| RichTextStream (0x08A6, 2.4.218) | Rich text properties as XML for the same targets (also taking in BRAI and ObjectLink), with the same layout and checksum rule as TextPropsStream: frtHeader (12), dwCheckSum (4), cb (4), rgb. |
Record order: the Chart Sheet Substream
[MS-XLS] 2.1.7.20.1 gives the order and nesting of the chart records as an ABNF
grammar. In it, [x] is optional, *x is zero or more,
1*x one or more, *2x at most two, 3x exactly three, and
/ is a choice. A chart is either a separate chart sheet or an embedded chart object
inside a worksheet or macro sheet (the OBJ rule, OBJ = Obj *Continue *CHART,
in the common productions of 2.1.7.20.6). The grammar leaves out the StartBlock/EndBlock pairs and
ChartFrtInfo; and when one of Font, Continue, LineFormat, AreaFormat, SeriesText, DefaultText, Text,
FontX, ObjectLink, Frame, Begin, End, PicF, Pos, AlRuns, BRAI, Fbi or GelFrame sits between a
StartObject and EndObject, it is replaced by an FrtWrapper record that holds it
(wrappedRecord).
CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP PrintSize
[HeaderFooter] [BACKGROUND] *Fbi *Fbi2 [ClrtClient] [PROTECTION] [Palette] [SXViewLink]
[PivotChartBits] [SBaseRef] [MsoDrawingGroup] OBJECTS Units CHARTFOMATS SERIESDATA
*WINDOW *CUSTOMVIEW [CodeName] [CRTMLFRT] EOF
CHARTSHEET = BOF CHARTSHEETCONTENT
CHARTFOMATS = Chart Begin *2FONTLIST Scl PlotGrowth [FRAME] *SERIESFORMAT *SS ShtProps *2DFTTEXT
AxesUsed 1*2AXISPARENT [CrtLayout12A] [DAT] *ATTACHEDLABEL [CRTMLFRT]
*([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) [TEXTPROPS] *2CRTMLFRT End
FONTLIST = FrtFontList StartObject *(Font [Fbi]) EndObject
AXISPARENT = AxisParent Begin Pos [AXES] 1*4CRT End
SERIESDATA = Dimensions 3(SIIndex *(Number / BoolErr / Blank / Label))
AXES = [IVAXIS DVAXIS [SERIESAXIS] / DVAXIS DVAXIS] *3ATTACHEDLABEL [PlotArea FRAME]
IVAXIS = Axis Begin [CatSerRange] AxcExt [CatLab] AXS [CRTMLFRT] End
DVAXIS = Axis Begin [ValueRange] [AXM] AXS [CRTMLFRT] End
SERIESAXIS = Axis Begin [CatSerRange] AXS [CRTMLFRT] End
CRT = ChartFormat Begin (Bar / Line / (BopPop [BopPopCustom]) / Pie / Area / Scatter / Radar /
RadarArea / Surf) CrtLink [SeriesList] [Chart3d] [LD] [2DROPBAR] *4(CrtLine LineFormat)
*2DFTTEXT [DataLabExtContents] [SS] *4SHAPEPROPS End
LD = Legend Begin Pos ATTACHEDLABEL [FRAME] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End
SERIESFORMAT = Series Begin 4AI *SS (SerToCrt / (SerParent (SerAuxTrend / SerAuxErrBar)))
*(LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End]) End
FRAME = Frame Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End
AI = BRAI [SeriesText]
ATTACHEDLABEL = Text Begin Pos [FontX] [AlRuns] AI [FRAME] [ObjectLink] [DataLabExtContents]
[CrtLayout12] [TEXTPROPS] [CRTMLFRT] End
SS = DataFormat Begin [Chart3DBarShape] [LineFormat AreaFormat PieFormat] [SerFmt] [GELFRAME]
[MarkerFormat] [AttachedLabel] *2SHAPEPROPS [CRTMLFRT] End
SHAPEPROPS = ShapePropsStream *ContinueFrt12
TEXTPROPS = (RichTextStream / TextPropsStream) *ContinueFrt12
AXS = [IFmtRecord] [Tick] [FontX] *4(AxisLine LineFormat) [AreaFormat] [GELFRAME]
*4SHAPEPROPS [TextPropsStream *ContinueFrt12]
DFTTEXT = [DataLabExt StartObject] DefaultText ATTACHEDLABEL [EndObject]
DROPBAR = DropBar Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End
AXM = YMult StartObject ATTACHEDLABEL EndObject
DAT = Dat Begin LD End
GELFRAME = 1*2GelFrame *Continue [PICF]
PICF = Begin PicF End
CRTMLFRT = CrtMlFrt *CrtMlFrtContinue
Reading it: the Chart record opens the chart; its records are bracketed by Begin and End. Each AXISPARENT (one or two, the primary and secondary axis groups) holds its position, its axes and one to four chart groups (CRT), each opened by ChartFormat and holding exactly one of the type records. A series is one SERIESFORMAT: Series, then four AI (title, categories, values, bubble sizes, each a BRAI and optional SeriesText), its data formats and either the link to a chart group (SerToCrt) or a trend line or error bar parent. The cached cell values of the series follow the formats in SERIESDATA: Dimensions and three SIIndex groups (the value, category and bubble caches), each followed by Number, BoolErr, Blank and Label records. Spec section 2.1.7.20.1 also states that within CUSTOMVIEW (2.1.7.20.6) the Selection, HorizontalPageBreaks and VerticalPageBreaks records must not occur in a chart sheet.
The XmlTk chain of CrtMlFrt (2.5.300 to 2.5.341)
The xmltkChain of a CrtMlFrt is an XmlTkChain: recordVersion (1, 0),
1 unused byte, xmltkParent (2) and then the token structures. Every token starts with an
XmlTkHeader of 4 bytes: drType (1), 1 unused byte and xmlTkTag (2). The data types are:
| drType | Structure | Layout after the header |
|---|---|---|
| 0x00 | XmlTkStart | nothing (4 bytes in all) |
| 0x01 | XmlTkEnd | nothing |
| 0x02 | XmlTkBool | dValue (1, Boolean) and 1 unused byte (6 bytes in all) |
| 0x03 | XmlTkDouble | 4 unused bytes, dValue (8, Xnum) (16 bytes in all) |
| 0x04 | XmlTkDWord | dValue (4, signed) (8 bytes in all) |
| 0x05 | XmlTkString | cchValue (4) and cchValue UTF-16 characters |
| 0x06 | XmlTkToken | dValue (2, unsigned) (6 bytes in all) |
| 0x07 | XmlTkBlob | cbBlob (4) and that many bytes |
The Xnum of a double may not be infinite, denormalised, NaN or negative zero.
xmltkParent says which chart element the chain belongs to and so which tokens it may hold, in this order:
| xmltkParent | Element (where the CrtMlFrt sits) | chainRecords |
|---|---|---|
| 0x0001 | value axis (the DVAXIS rule) | [MaxFrt] [MinFrt] [LogBaseFrt] |
| 0x0002 | the chart space (CHARTSHEET or CHARTSHEETCONTENT) | [Style] [ThemeOverride] [ColorMappingOverride] |
| 0x0004 | category or series axis (IVAXIS, SERIESAXIS) | [NoMultiLvlLbl] [TickLabelSkipFrt] [TickMarkSkipFrt] [MajorUnitFrt] [MinorUnitFrt] [TickLabelPositionFrt] [BaseTimeUnitFrt] [FormatCodeFrt] [MajorUnitTypeFrt] [MinorUnitTypeFrt] |
| 0x0005 | CHARTFORMATS, directly before its End | [ShowDLblsOverMax] [BackWallThicknessFrt] [FloorThicknessFrt] [DispBlanksAsFrt] [SURFACE], where SURFACE = StartSurface [FormatCodeFrt [Spb]] [Tpb] EndSurface |
| 0x000F | legend (LD) | [Overlay] |
| 0x0013 | data markers (SS) | [SymbolFrt] |
| 0x0016 | CHARTFORMATS, directly before its End (plot area) | [PieComboFrom12Frt] |
| 0x0019 | chart title (ATTACHEDLABEL within CHARTFORMATS) | [Overlay] |
| 0x0037 | CHARTFORMATS, directly before its End (the 3-D view) | [RAngAxOffFrt] [PerspectiveFrt] [RotYFrt] [RotXFrt] [HeightPercent] |
Each token has a fixed tag and overrides one field of a normal record:
| Token | Type | xmlTkTag | Meaning |
|---|---|---|---|
| LogBaseFrt | Double | 0x0000 | logarithmic base, 2 to 1000, replacing 10 when ValueRange fLog is 1 |
| Style | DWord | 0x0003 | built-in chart style, 1 to 48 and not 2 (a one-based index; present only for a non-default style) |
| Spb | Blob | 0x001E | shape properties as a DEFLATE-compressed (RFC 1951) XML stream, [ECMA-376] 21.2.2.197 |
| Tpb | Blob | 0x0020 | text properties, the same packing, [ECMA-376] 21.2.2.216 |
| SymbolFrt | Token | 0x0022 | marker style, replacing imk of MarkerFormat when its fAuto is 1; the value is 0x0023 none, 0x0024 diamond, 0x0025 square, 0x0026 triangle, 0x0027 X, 0x0028 star, 0x0029 dot, 0x002A dash, 0x002B circle, 0x002C plus |
| NoMultiLvlLbl | Bool | 0x002E | 1 means single-level labels on a category axis |
| Overlay | Bool | 0x002F | the legend or title may overlap other elements (always 1 when present) |
| ThemeOverride | Blob | 0x0033 | theme override, compressed XML, [ECMA-376] 20.1.6.12 |
| ColorMappingOverride | Blob | 0x0034 | colour mapping override, compressed XML, [ECMA-376] 19.3.1.7 |
| BackWallThicknessFrt | DWord | 0x0035 | back wall thickness, 1 to 100 per cent of the depth of the 3-D plot area (only with Chart3d) |
| FloorThicknessFrt | DWord | 0x0036 | floor thickness, 1 to 100 per cent of its height (only with Chart3d) |
| PerspectiveFrt | DWord | 0x004D | field of view, twice the angle, 0 to 200; replaces pcDist; bar and pie groups only, with fPerspective; absent for the default 20 |
| RotXFrt | DWord | 0x004E | rotation about the horizontal axis, –90 to –1 or 45 to 90; replaces anElev; bar groups only |
| RotYFrt | DWord | 0x004F | rotation about the vertical axis, 45 to 359; replaces anRot; bar groups only |
| RAngAxOffFrt | Bool | 0x0050 | the plot area has a vanishing point; always 1; bar groups with fPerspective |
| TickLabelSkipFrt | DWord | 0x0051 | categories between labels; replaces catLabel of CatSerRange when that is not 1 |
| TickMarkSkipFrt | DWord | 0x0052 | tick marks to skip; replaces catMark when that is not 1 |
| MajorUnitFrt | Double | 0x0053 | major interval of a date axis; replaces catMajor of AxcExt when fAutoMajor is 1 |
| MinorUnitFrt | Double | 0x0054 | minor interval; replaces catMinor when fAutoMinor is 1 |
| MaxFrt | Double | 0x0055 | maximum of a logarithmic value axis whose base is not 10; replaces numMax |
| MinFrt | Double | 0x0056 | the minimum likewise; replaces numMin |
| StartSurface / EndSurface | Start / End | 0x0059 (start; the end repeats the start’s tag) | brackets a wall definition; the spec table here is cut by a page break and shows only 0x0059, the side wall |
| ShowDLblsOverMax | Bool | 0x005B | show data labels whose values exceed the axis maximum |
| TickLabelPositionFrt | Token | 0x005C | value 0x005D: series-axis labels centred (as vat 2 of Text) |
| PieComboFrom12Frt | Bool | 0x005E | the chart has several groups and one is a pie; always 1 |
| BaseTimeUnitFrt | Token | 0x005F | base unit of a date axis (replaces duBase when fAutoBase is 1): 0x0060 days, 0x0061 months, 0x0062 years |
| FormatCodeFrt | String | 0x0064 | number format of the date axis labels, replacing ifmt of BRAI when its fUnlinkedIfmt is 0 |
| HeightPercent | Double | 0x0065 | plot area height as per cent of its width, 5 to 500; replaces pcHeight; not for pie groups; with f3DScaling |
| DispBlanksAsFrt | Token | 0x0066 | blank cells: 0x0067 gap, 0x0069 span with a line (area and stacked line groups); replaces mdBlank of ShtProps |
| MajorUnitTypeFrt | Token | 0x006A | unit of the major interval: 0x0060 days, 0x0061 months, 0x0062 years; replaces duMajor |
| MinorUnitTypeFrt | Token | 0x006B | the same for the minor interval; replaces duMinor |
FontInfo (2.5.130)
One entry of the FrtFontList: 2 bytes, then ifnt (2, a FontIndex). In the first word bit 0 is
fScaled (0 a fixed size, 1 the font scales with the chart area, or with the plot area) and bits 1 to
15 are reserved. This is the flag the DefaultText records 2 and 3 above select on.
Source
[MS-XLS] Excel Binary File Format (.xls) Structure, v20250819, the section 2.4 entry of each record named above, 2.1.7.20.1 for the record order (above) and 2.5.130 and 2.5.300 to 2.5.341 for FontInfo and the XmlTk structures. Not covered here: the XML of the stream records and the compressed XML blobs, which is [ECMA-376] DrawingML. The XmlTk tables are transcribed from the spec text and have not been checked against a real file. Where a spec table was cut short by the page breaks of the PDF text (the Pos and Text position tables, DefaultText, StartBlock contexts), the page gives only what could be read in full.
Divergence from the specification
xlrd and SheetJS do not decode chart records. LibreOffice Calc does (its
xichart.cxx and xlchart.cxx, read in earlier rounds); the viewer
follows it where the specification is silent or says “unused”. The places are listed
here and on the overview.
- In the scatter chart of Apache POI’s
SimpleScatterChart.xlsthe BRAI record withid1 refers to the cells that were plotted vertically and the one withid2 to those plotted horizontally, the reverse of the wording of [MS-XLS] 2.4.29 above. The viewer follows the file. Only this one scatter file was available. - The Legend record’s byte at offset 16 is “unused” in [MS-XLS] 2.4.152 and the rectangle of the Pos record MUST be ignored; LibreOffice reads the byte as a dock mode (0 bottom, 1 corner, 2 top, 3 right, 4 left, 7 not docked, then the Pos record). The viewer follows LibreOffice.
- Combined groups: a chart with several bar, line or area groups is drawn with every
group on shared axes (scale over all groups), as LibreOffice does for
lo-made-combined-3d.xls. A bar, line or area group of the secondary axis group (the second AxisParent,iax1) gets its own value scale, labelled at the right edge, when the secondary value axis is shown. LibreOffice shows the axis from the line of its AxisLine record with id 0 (xichart.cxx,XclImpChAxis::CreateAxis, property Show): a secondary axis whose line format is none is hidden, and then the soffice PDF oflo-chartx.xlsdraws the line series on the primary scale, as the viewer does. With the axis shown (lo-made-secondary-axis.xls, made fromsamples/xls/fods/secondary-axis.fods) the soffice PDF has a right axis 0 to 0.6 in steps of 0.1 and the viewer draws the same labels and line positions. A horizontal bar group on the secondary axis group, and pie, scatter or radar groups inside a combined chart, are not drawn. - 3-D: Chart3d (2.4.46) gives rotation, elevation, perspective and depth. The viewer
draws only an oblique projection (columns as boxes with side and top faces; a pie
squashed by the sine of the elevation and extruded), not the perspective of Excel or
LibreOffice. The walls and floor (a back wall, a side wall and a floor), horizontal
3-D bars, 3-D line charts (a ribbon per series) and 3-D area charts (an extruded
area per series, the first series in front) are drawn in the same oblique view and
checked by eye against the soffice render of
lo-made-threed-kinds.xls, which staggers the series in depth by its own rules; the exact depth spacing and the wall colours of Excel are not checked. The Chart3DBarShape risers (0x105F) are drawn from the record's description (cylinder, cone, pyramid; "tapers to the maximum" is drawn as "tapers to a point"). No oracle draws them: LibreOffice writes this record as a rectangular riser with no taper (0000) for a cylinder, cone or pyramid chart (lo-made-threed-shapes.xls) and renders boxes, so the drawing follows the specification only and is unchecked. A surface group (Surf, 2.4.272) is drawn from above as value bands; no oracle program exists for it, so it is unchecked. - xlrd skips an embedded chart: on an embedded BOF in a sheet it reads and drops every
record up to the next EOF, and logs a warning unless the BOF type is 0x20
(
xlrd/sheet.pylines 1130–1139). - SheetJS lists the record
0x1002(Chart) and0x0850(ChartFrtInfo) in its record table with no handler (xlsx.flow.jslines 21029 and 20961).
Key programs
- xlrd, SheetJS – skip charts, as above.
- Excel – the producer; not available here.
- LibreOffice Calc – reads and writes charts in this format; its chart
import code (
xichart.cxx,xlchart.cxx) was read for the legend dock byte, the automatic series colours and titles, and its PDF output is the oracle for the viewer’s renders.