a:graphicData (Graphic Data Container)

Container for namespace-specific graphic content (charts, SmartArt, pictures, tables).

Parent elements

Description

a:graphicData is the payload container within a:graphic that holds namespace-specific content. It is defined in ECMA-376 Part 1 §20.1.2.2.

The uri attribute determines what type of content is inside and what namespace applies to child elements:

  • Charts (http://schemas.openxmlformats.org/drawingml/2006/chart) – Contains c:chart
  • Pictures (http://schemas.openxmlformats.org/drawingml/2006/picture) – Contains pic:pic
  • SmartArt/Diagrams (http://schemas.microsoft.com/office/word/2010/wordprocessingShape) – Contains diagram elements
  • Tables (DrawingML a:tbl)
  • Other custom content – Extensibility point for application-specific data

The actual child elements depend on the URI; the namespace declares which XML schema applies to the content inside.

Attributes

Attribute Type Possible Values Description
uri xsd:anyURI Namespace URI (see common values below) Identifies the content type and namespace of child elements.

Common URI Values:

  • http://schemas.openxmlformats.org/drawingml/2006/chart – Chart content
  • http://schemas.openxmlformats.org/drawingml/2006/picture – Picture content
  • http://schemas.microsoft.com/office/word/2010/wordprocessingShape – Word shape
  • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing – Word drawing
  • http://schemas.microsoft.com/office/visio/2010/visioDocument – Visio diagram

Examples

Picture Content (Chart Namespace)

<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart">
  <c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart"
           xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
           r:id="rId2"/>
</a:graphicData>

Picture Content (Picture Namespace)

<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
  <pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"
           xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
    <pic:nvPicPr>
      <pic:cNvPr id="1" name="Picture 1"/>
      <pic:cNvPicPr/>
    </pic:nvPicPr>
    <pic:blipFill>
      <a:blip r:embed="rId3"/>
      <a:stretch><a:fillRect/></a:stretch>
    </pic:blipFill>
    <pic:spPr>
      <a:xfrm>
        <a:off x="0" y="0"/>
        <a:ext cx="1828800" cy="1371600"/>
      </a:xfrm>
      <a:prstGeom prst="rect"><a:avLst/></a:prstGeom>
    </pic:spPr>
  </pic:pic>
</a:graphicData>

Table Content

<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table">
  <a:tbl>
    <a:tblPr/>
    <a:tblGrid>
      <a:gridCol w="1828800"/>
      <a:gridCol w="1828800"/>
    </a:tblGrid>
    <a:tr h="914400">
      <a:tc>
        <a:txBody><a:bodyPr/><a:p><a:r><a:t>Cell 1</a:t></a:r></a:p></a:txBody>
        <a:tcPr/>
      </a:tc>
      <a:tc>
        <a:txBody><a:bodyPr/><a:p><a:r><a:t>Cell 2</a:t></a:r></a:p></a:txBody>
        <a:tcPr/>
      </a:tc>
    </a:tr>
  </a:tbl>
</a:graphicData>

Notes

  • The uri attribute is critical – it determines the XML schema and namespace for child elements.
  • Namespace declarations on child elements are required to distinguish between different XML schemas.
  • Relationship IDs (r:embed, r:link) are used to reference external resources like images and charts.
  • The a:graphicData element is always the only child of a:graphic.
  • Child element names and structure depend entirely on the declared URI; there’s no fixed schema.
  • Common content types (charts, pictures) use established namespaces; custom content can use custom URIs.