A chart in an HWP document is an OLE
object whose data, kept in BinData, is itself an OLE compound file. Its
top storage holds a Contents stream in Hangul’s own chart format and, from
Hangul 2018, an OOXMLChartContents stream. This page follows Hancom’s
chart specification, revision 1.2 (20 November 2014), and section 4.3.9.6 of the HWP 5.0
specification, revision 1.3, with their table numbers.
Streams
| Stream | Contents |
|---|---|
Contents | Hangul’s chart format, described below. Charts from Hangul Neo and older have only this stream. Hangul 2018 writes it too, as a fallback converted from its OOXML chart. |
OOXMLChartContents | From Hangul 2018: an Office Open XML chart whose root element is chartSpace, as in the DrawingML chart part of ECMA-376 and ISO/IEC 29500. |
Chart objects
The Contents data is a sequence of chart objects, one after another. Each
is laid out as:
| Field | Type | Meaning |
|---|---|---|
id | long | Object ID |
StoredtypeId | long | The object’s type |
StoredName | char* | Type name – left out when an object of the same StoredtypeId came earlier |
StoredVersion | int | Type version – left out under the same rule |
ChartObjData | chart object | The object’s data, which can contain further chart objects |
The tree starts at a VtChart object, whose children are Backdrop,
DataGrid, Footnote, Legend, Plot, PrintInformation and Title; each child holds its own
objects in turn (a Legend holds a VtFont and a TextLayout, for example). The
specification lists each object’s properties and their types (Integer, Long, Single,
Double, Boolean, String or another object) but not how each type is encoded in bytes,
the order in which properties are stored, nor the numeric type IDs; those are unknown
here.
Objects and their properties
Tables 1 to 63. Constants named in brackets are listed below; sizes marked “pt” are in points.
| Object | What it is | Properties (type) |
|---|---|---|
| VtChart | The chart | ActiveSeriesCount (Integer), AllowDithering, AllowDynamicRotation, AllowSelections, AllowSeriesSelection, AllowUserChanges, AutoIncrement (Boolean), Backdrop, Chart3d (Boolean), ChartType (Integer, ChartType), Column, ColumnCount (Integer), ColumnLabel (String), ColumnLabelCount, ColumnLabelIndex (Integer), Data (String), DataGrid, DoSetCursor (Boolean), DrawMode (Integer, DrawMode), ErrorOffset (Integer), FileName (String), Footnote, FootnoteText (String), Handle (Long), Legend, Picture (Integer), Plot, PrintInformation, RandomFill, Repaint (Boolean), Row, RowCount (Integer), RowLabel (String), RowLabelCount, RowLabelIndex, SeriesColumn, SeriesType (Integer, SeriesType), ShowLegend (Boolean), SsLinkMode (Integer, SsLinkMode), SsLinkRange, SsLinkBook (String), Stacking (Boolean), TextLengthType (Integer, TextLengthType), Title, TitleText (String), TwipsWidth, TwipsHeight (Integer, in twips) |
| VtColor | A drawing colour | Automatic (Boolean), Blue, Green, Red (Integer), Value (Integer: the RGB value, the default property) |
| VtFont | A font | Color (VtColor), Effects (Integer, FontEffect), Name (String), Size (Single, pt), Style (Integer, FontStyle) |
| VtPicture | A graphic shown in the chart | Embedded (Boolean: stored with the chart), Filename (String), Map (Integer, PictureMapType), Type (Integer, PictureType) |
| Attributes | Collection of contours | Count (Long), Item (Attribute) |
| Attribute | A contour and its look | Brush, Pen, Text (String: legend text), Value (Double) |
| Axis | An axis | AxisGrid, AxisScale, AxisTitle, CategoryScale, DateScale, Intersection, Labels (collection), LabelLevelCount (Integer), Pen, Tick, ValueScale |
| AxisGrid | Grid lines of an axis | MajorPen, MinorPen (Pen) |
| AxisScale | How values are plotted on an axis | Hide (Boolean), LogBase (Integer), PercentBasis (String), Type (Integer, ScaleType) |
| AxisTitle | An axis title | Backdrop, Text (String), TextLayout, TextLength (Integer), Visible (Boolean), VtFont |
| Backdrop | Shading, pattern or picture behind an object | Frame, Fill, Shadow |
| Bar | Bars of a 3D bar chart | Sides (Integer), TopRatio (Single) |
| Brush | A fill | FillColor (VtColor), Index (Integer: a BrushPatterns or BrushHatches value), PatternColor (VtColor), Style (Integer, BrushStyle) |
| CategoryScale | Scale of a category axis | Auto (Boolean), DivisionsPerLabel, DivisionsPerTick (Integer), LabelTick (Boolean) |
| Contour | Contours of a 3D elevation chart | DisplayType (Integer, ContourDisplayType) |
| ContourGradient | Gradient contours | FromBrushColor, ToBrushColor, FromPenColor, ToPenColor (VtColor) |
| Coor | Floating-point x, y pair | X, Y (Single) |
| Coor3 | Floating-point x, y, z | X, Y, Z (Single) |
| DataGrid | The chart’s data grid | ColumnCount (Integer), ColumnLabel (String), ColumnLabelCount (Integer), CompositeColumnLabel (printed Integer), CompositeRowLabel (String), RowCount (Integer), RowLabel (String), RowLabelCount (Integer) |
| DataPoints | Collection of data points | Count (Long), Item (DataPoint) |
| DataPoint | A data point | Brush, DataPointLabel, EdgePen (Pen), Offset (Single), Marker, VtPicture |
| DataPointLabel | Label of a data point | Backdrop, Component (Integer, LabelComponent), Custom (Boolean), LineStyle (Integer, LabelLineStyle), LocationType (Integer, LabelLocationType), Offset (Coor), PercentFormat (String), Text (String), TextLayout, TextLength (Integer), ValueFormat (String), VtFont |
| DateScale | Scale of a date axis | Auto (Boolean), MajFreq (Integer), MajInt (Integer, DateIntervalType), Maximum, Minimum (Double), MinFreq (Integer), MinInt (Integer, DateIntervalType), SkipWeekend (Boolean) |
| Doughnut | Doughnut chart settings | Sides (Integer), InteriorRatio (Single) |
| Elevation | Elevation chart settings | Attributes (collection), AutoValues (Boolean), ColorType (Integer), ColSmoothing (Integer), Contour, ContourGradient, RowSmoothing (Integer), SeparateContourData (Boolean), Surface |
| Fill | Kind and look of a background | Brush, Gradient, Style (Integer, FillStyle), VtPicture |
| Footnote | Text under the chart | Backdrop, Location, Text (String), TextLayout, TextLength (Integer), VtFont |
| Frame | Frame round an object | Style (Integer, FrameStyle), Width (Single, pt), FrameColor, SpaceColor (VtColor) |
| Gradient | A gradient fill | FromColor (VtColor), Style (Integer, GradientStyle), ToColor (VtColor) |
| HiLo | High-low chart colours | GainColor, LossColor (VtColor) |
| Intersection | Where an axis crosses another | Auto (Boolean), AxisId (Integer, AxisId), Index (Integer), LabelsInsidePlot (Boolean), Point (Double) |
| Labels | Collection of axis labels | Count (Long), Item (Label) |
| Label | An axis label | Auto (Boolean), Backdrop, Format (String), FormatLength (printed String), Standing (Boolean), TextLayout, VtFont |
| LCoor | Long-integer x, y pair | X, Y (Long) |
| Legend | The legend | Backdrop, Location, TextLayout, VtFont |
| Light | Lighting of a 3D chart | AmbientIntensity, EdgeIntensity (Single), EdgeVisible (Boolean), LightSources (collection) |
| LightSources | Collection of light sources | Count (Long), Item (LightSource) |
| LightSource | A light source | X, Y, Z, Intensity (Single) |
| Location | Where a text is placed | LocationType (Integer; the specification points at LabelLocationType), Rect, Visible (Boolean) |
| LRect | Rectangle in long-integer coordinates | Max, Min (printed as Coor; described as long integers) |
| Marker | Marker of a data point | FillColor (VtColor), Pen, Size (Single, pt), Style (Integer, MarkerStyle), Visible (Boolean), VtPicture |
| Pen | Line colour and pattern | Cap (Integer, PenCap), Join (Integer, PenJoin), Limit (Single, pt), Style (Integer, PenStyle), Width (Single, pt), VtColor |
| Pie | Pie chart settings | ThicknessRatio, TopRadiusRatio (Single) |
| Plot | The plot area | AngleUnit (Integer, AngleUnits), AutoLayout (Boolean), Axis, Backdrop, BarGap (Single), Clockwise, DataSeriesInRow (Boolean), DefaultPercentBasis (Integer, PercentAxisBasis), DepthToHeightRatio (Single), Doughnut (printed as Coor), Elevation, Light, LocationRect (Rect), MaxBubbleToAxisRatio (Single), Perspective (Coor3), Pie, PlotBase, Projection (Integer, ProjectionType), ScaleAngle (Single), Series, Sort (Integer, SortType), StartingAngle (Single), SubPlotLabelPosition (Integer, SubPlotLabelLocationType), UniformAxis (Boolean), View3D, Wall, WidthToHeightRatio (Single), Weighting, xGap (Single), XYZ, zGap (Single) |
| PlotBase | The area under the chart | Brush, BaseHeight (Single, pt), Pen |
| Position | Order of a series; series with the same order are stacked | Excluded, Hidden (Boolean), Order, StackOrder (Integer) |
| PrintInformation | How the chart prints | BottomMargin (Single), CenterHorizontally, CenterVertically, LayoutForPrinter (Boolean), LeftMargin (Single), Monochrome (Boolean, unused), Orientation (Integer, PrintOrientation), RightMargin (Single), ScaleType (Integer, PrintScaleType), TopMargin (Single) |
| Rect | A rectangle | Min, Max (Coor) |
| SeriesCollection | Collection of series | Count (Long), Item (Series) |
| Series | A series of data points | Bar, DataPoints (collection), GuidelinePen (Pen; setting it turns on ShowGuideLines), HiLo, LegendText (String), Pen (setting it turns on ShowLine), Position, SecondaryAxis (Boolean), SeriesLabel, SeriesMarker, SeriesType (Integer, SeriesType), ShowGuideLines, ShowLine (Boolean), SmoothingFactor (Integer), SmoothingType (Integer, SmoothingType), StatLine |
| SeriesLabel | Label of a series | Backdrop, LineStyle (Integer), LocationType (Integer, LabelLocationType), Offset (Coor), Text (String; by default the column label), TextLayout, TextLength (printed Single), VtFont |
| SeriesMarker | Markers of a series | Auto, Show (Boolean) |
| Shadow | A shadow | Brush, Offset (Coor), Style (Integer, ShadowStyle) |
| StatLine | Statistics lines | Flags (Integer, StatsType), Style (Integer, PenStyle), VtColor, Width (Single, pt) |
| Surface | Surface chart settings | Base (Integer, SurfaceBaseType), Brush, ColWireframe (Integer, SurfaceWireframeType), DisplayType (Integer, SurfaceDisplayType), Projection (Integer, SurfaceProjectionType), RowWireframe (Integer, SurfaceWireframeType), WireframePen (Pen) |
| TextLayout | Placement and direction of text | WordWrap (Boolean), HorzAlignment (Integer, HorizontalAlignment), Orientation (Integer, Orientation), VertAlignment (Integer, VerticalAlignment) |
| Tick | Tick marks of an axis | Length (Single, pt), Style (Integer, AxisTickStyle) |
| Title | The chart title | Backdrop, Location, Text (String, the default property), TextLayout, TextLength (Integer, read-only), VtFont |
| ValueScale | Scale of a value axis | Auto (Boolean), MajorDivision (Integer), Maximum, Minimum (Double; setting either turns Auto off), MinorDivision (Integer) |
| View3D | Viewing angle of a 3D chart | Elevation, Rotation (Single) |
| Wall | The wall behind a 3D chart’s Y axis | Brush, Pen, Width (Single, pt) |
| Weighting | Relative size of pies or doughnuts | Basis (Integer, PieWeightBasis), Style (Integer, PieWeightStyle) |
| XYZ | Where the axes of a 3D XYZ chart cross | Automatic (Boolean: all at 0, 0, 0), xIntersection, yIntersection, zIntersection (Double; setting one turns Automatic off) |
Constants
Tables 64 to 115. Several captions in the specification are misprinted (four say “LocationType”); the section headings are used here.
ChartType
| Value | Chart | Value | Chart |
|---|---|---|---|
| 0 | 3D bar | 14 | 2D pie |
| 1 | 2D bar | 15 | 2D doughnut |
| 2 | 3D line | 16 | 2D XY |
| 3 | 2D line | 17 | 2D cone (원추, as printed) |
| 4 | 3D area | 18 | 2D radial |
| 5 | 2D area | 19 | 2D bubble |
| 6 | 3D step | 20 | 2D high-low |
| 7 | 2D step | 21 | 2D Gantt |
| 8 | 3D combination | 22 | 3D Gantt |
| 9 | 2D combination | 23 | 3D surface |
| 10 | 3D horizontal bar | 24 | 2D contour |
| 11 | 2D horizontal bar | 25 | 3D scatter |
| 12 | 3D clustered bar | 26 | 3D XYZ |
| 13 | 3D pie |
SeriesType
| Value | Series | Value | Series |
|---|---|---|---|
| 0 | 3D bar | 18 | High-low-close, with the close marker on the right |
| 1 | 2D bar | 19 | Open-high-low-close |
| 2 | 3D horizontal bar | 20 | Open-high-low-close bar |
| 3 | 2D horizontal bar | 21 | 2D Gantt |
| 4 | 3D clustered bar | 22 | 3D Gantt |
| 5 | 3D line | 23 | 3D pie |
| 6 | 2D line | 24 | 2D pie |
| 7 | 3D area | 25 | Doughnut |
| 8 | 2D area | 26 | Date |
| 9 | 3D step | 27 | Floating 3D bar |
| 10 | 2D step | 28 | Floating 2D bar |
| 11 | XY | 29 | Floating 3D horizontal bar |
| 12 | Cone (원추, as printed) | 30 | Floating 2D horizontal bar |
| 13 | Radial line | 31 | Floating 3D clustered bar |
| 14 | Radial area | 32 | 3D surface |
| 15 | Bubble | 33 | 2D contour |
| 16 | High-low | 34 | 3D XYZ |
| 17 | High-low-close |
The other constants
| Constant | Values |
|---|---|
| AngleUnits | 0 degrees, 1 radians, 2 grads |
| AxisId | 0 X axis, 1 Y axis, 2 secondary Y axis, 3 Z axis |
| AxisTickStyle | 0 no tick marks, 1 centred on the axis, 2 inside the axis, 3 outside the axis |
| BrushStyle | 0 no brush (transparent), 1 solid, 2 bitmap pattern, 3 hatch |
| BrushPatterns | 0–17, given only as pictures: 0–4 dot screens from dark to light, 5 horizontal lines, 6 vertical lines, 7 downward diagonals, 8 upward diagonals, 9 and 10 fine checks, 11 thin horizontal lines, 12 thin vertical lines, 13 thin downward diagonals, 14 thin upward diagonals, 15 grid, 16 and 17 dense checks (as drawn) |
| BrushHatches | 0–5, given as pictures: 0 horizontal, 1 vertical, 2 downward diagonal, 3 upward diagonal, 4 cross, 5 diagonal cross (as drawn) |
| ContourDisplayType | 0 contour bands, 1 contour lines |
| ContourColorType | 0 the series colours, 1 an even gradation, 2 user-defined colours (only when not automatic) |
| DateIntervalType | 0 none, 1 daily, 2 weekly (Mondays), 3 twice a month (1st and 15th), 4 monthly (1st), 5 yearly (1 January) |
| DrawMode | 0 redraw on screen after every change, 1 redraw off screen and show when done |
| DcType | Device context given by an hdc: 0 none, 1 display, 2 printer, 3 a device, in Windows metafile form |
| FillStyle | 0 none (transparent), 1 solid or pattern, 2 gradient |
| FontEffect | 0 bold, 1 italic, 2 outline (as printed; the same list as FontStyle) |
| FontStyle | 0 bold, 1 italic, 2 outline |
| FrameStyle | 0 none, 1 single line, 2 two lines of equal width, 3 thick inner and thin outer line, 4 thin inner and thick outer line |
| GradientStyle | 0 top to bottom, 1 left to right, 2 concentric rectangles from the centre, 3 concentric ellipses from the centre |
| HorizontalAlignment | 0 left, 1 right, 2 centre |
| LabelComponent | 0 the value (XY, cone and bubble points show all their two or three values), 1 the value as a percentage of the series total, 2 the series name (the data grid column label), 3 the data point name |
| LabelLineStyle | 0 no line, 1 straight line, 2 bent line from label to series |
| LabelLocationType | 0 not shown, 1 above the point, 2 below, 3 centred, 4 at the base along the category axis, 5 inside a pie slice, 6 outside a pie slice, 7 left of the point, 8 right of the point |
| LocationType | 0 top, 1 top left, 2 top right, 3 left, 4 right, 5 bottom, 6 bottom left, 7 bottom right, 8 custom |
| MarkerStyle | 0 hidden; the others as pictures: 1 dash, 2 plus, 3 cross, 4 star, 5 circle, 6 square, 7 diamond, 8 triangle up, 9 triangle down, 10 filled circle, 11 filled square, 12 filled diamond, 13 filled triangle up, 14 filled triangle down, 15 3D ball (as drawn) |
| Orientation | 0 horizontal, 1 stacked (letters one above another), 2 rotated to read upwards, 3 rotated to read downwards |
| PartType | 0 the chart control, 1 title, 2 footnote, 3 legend, 4 plot, 5 series, 6 series label, 7 data point, 8 data point label, 9 axis, 10 axis label, 11 axis title |
| PercentAxisBasis | 0 the largest value in the chart is 100%; 1 the largest in each row; 2 the largest in each series; 3 the sum of all values; 4 the sum of each row (100% stacked charts); 5 the sum of each series |
| PenCap | 0 square at the end point, 1 a semicircle as wide as the line, 2 square, extended past the end by half the width |
| PenJoin | 0 outer edges extended until they meet, 1 a round arc round the meeting point, 2 the gap between the ends filled |
| PenStyle | 0 no pen; the others as pictures: 1 solid, 2 dash, 3 dot, 4 dash dot, 5 dash dot dot, 6 fine dots, 7 long dash dot, 8 long dash dot dot (as drawn) |
| PictureOptions | 0 do not write the placeable header to metafiles, 1 save chart text as curves |
| PictureMapType | 0 actual size, 1 fit keeping proportions, 2 stretch to fill, 3 tile, 4 crop to fill keeping proportions |
| PictureType | 0 none, 1 Windows bitmap, 2 Windows metafile with a placeable header |
| PieWeightBasis | 0 all pies the same size, 1 sized by each pie’s total against the largest, 2 sized by the first data column, a relative size index |
| PieWeightStyle | 0 the area varies with the weight, 1 the diameter varies |
| PrintOrientation | 0 portrait (along the short side), 1 landscape (rotated to the long side) |
| PrintScaleType | 0 actual size, 1 fit keeping proportions, 2 stretch to the page |
| ProjectionType | 0 perspective, receding into the distance (the default), 1 “2.5D”: depth, but the XY face does not change when rotated or elevated, 2 3D without perspective |
| ScaleType | 0 linear, 1 logarithmic (base LogBase), 2 percentage |
| ShadowStyle | 0 none, 1 background shadow |
| SmoothingType | 0 none, 1 quadratic B-spline (closer to the points), 2 cubic B-spline (smoother) |
| SortType | 0 as in the data grid, 1 smallest slice first, 2 largest slice first |
| SsLinkMode | 0 no spreadsheet link; 1 linked, the grid size taken from Column, Row, ColumnLabelCount and RowLabelCount; 2 linked, the program works out labels, data and grid size itself |
| StatsType | 0 minimum, 1 maximum, 2 mean, 3 standard deviation, 4 trend line |
| SubPlotLabelLocationType | 0 none, 1 above the pie, 2 below the pie, 3 centred |
| SurfaceBaseType | 0 a base extended to the edge of the surface, 1 a base like a 3D bar chart’s, 2 a standard base with contour bands on top, 3 a standard base with contour lines on top |
| SurfaceDisplayType | 0 not shown, 1 contour bands, 2 contour lines, 3 surface brush, 4 surface brush with contour lines |
| SurfaceProjectionType | 0 none, 1 contour bands projected above the surface, 2 contour lines projected |
| SurfaceWireframeType | 0 none, 1 on major divisions, 2 on major and minor divisions |
| TextLengthType | 0 optimised for printing (TrueType virtual metrics; text may be cut), 1 optimised for the screen |
| TextOutputType | 0 null device context, 1 metafile |
| VerticalAlignment | 0 top, 1 bottom, 2 centre |
Sources
- Hangul document file format: charts, revision 1.2 – Hancom’s chart specification (PDF, in Korean)
- Hangul document file format 5.0, revision 1.3 – Hancom’s specification (PDF, in Korean), section 4.3.9.6