2.2.3.17 Chart Area

For non-embedded charts, the size of the area is specified by the Chart record (section 2.4.45) in points. For embedded charts, the chart is treated as a drawing and its size is calculated from the OfficeArtClientAnchorSheet record (section 2.5.193) that is contained in the MsoDrawing (section 2.4.170) preceding the chart stream. The chart area calculation is as follows:

1. Get chart area width in pixels

chart area width in pixels = (dx field of Chart record - 8) * DPI of the display device / 72 for non-embedded charts.

chart area width in pixels is calculated from individual cell widths/heights that anchor the chart as indicated by OfficeArtClientAnchorSheet (section 2.5.193) for embedded charts.

If the frt field of the Frame record (section 2.4.128) following the Chart record (section 2.4.45) is 0x0004 and the chart is not embedded, add the shadow size:

chart area width in pixels -= 2 * line width of the display device in pixels

2. Get chart area height in pixels

chart area height in pixels = (dy field of Chart record - 8) * DPI of the display device / 72 for non-embedded charts.

chart area height in pixels is calculated from individual cell widths/heights that anchor the chart as indicated by OfficeArtClientAnchorSheet (section 2.5.193) for embedded charts.

If the frt field of the Frame record (section 2.4.128) following the Chart record (section 2.4.45) is 0x0004 and the chart is not embedded, add the shadow size:

chart area height in pixels -= 2 * line height of the display device in pixels