Chart Part

Content Type:

application/vnd.openxmlformats-officedocument.drawingml.chart+xml

Root Namespace:

http://schemas.openxmlformats.org/drawingml/2006/chart

Source Relationship:

http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart

An instance of this part type describes a chart.

A package shall contain a Chart part for each chart in the document. In a WordprocessingML document, each such part shall be the target of an explicit relationship in a Main Document (§11.3.10) part. In a SpreadsheetML document, each such part shall be the target of an explicit relationship in a Drawings (§12.3.8) part. In a PresentationML document, each such part shall be the target of an explicit relationship in a Handout Master (§13.3.3), Notes Master (§13.3.4), Notes Slide (§13.3.5), Slide (§13.3.8), Slide Layout (§13.3.9), or Slide Master (§13.3.10) part. This part is permitted to also be the target of an explicit relationship in a Chart Drawing (§14.2.2) part, if the chart that points at this Chart Drawing part is the target of a relationship from a Chartsheet part. In other words, the only time a chart can embed another chart is if the parent chart is part of a chartsheet.

example:
<Relationships xmlns="…">
  <Relationship Id="rId4" 
    Type="http://…/chart" Target="charts/chart1.xml"/> 
  <Relationship Id="rId5" 
    Type="http://…/chart" Target="charts/chart2.xml"/>
</Relationships>

The following Drawings part-relationship item contains a relationship to a Chart part, which is stored in the ZIP item ../charts/chart1.xml:

<Relationships xmlns="…">
  <Relationship Id="rId1" 
    Type="http://…/relationships/chart" Target="../charts/chart1.xml"/>
</Relationships>

The following Slide part-relationship item contains relationships to two Chart parts, which are stored in the ZIP items ../charts/chartN.xml:

<Relationships xmlns="…">
  <Relationship Id="rId4" 
    Type="http://…/chart" Target="../charts/chart1.xml"/>
  <Relationship Id="rId5" 
    Type="http://…/chart" Target="../charts/chart2.xml"/>
</Relationships>

The root element for a part of this content type shall be< chartSpace>.

example:
<c:chartSpace …>
  <c:chart>
    <c:title>
      
    </c:title>
    <c:plotArea>
      <c:layout>
        
      </c:layout>
      <c:barChart>
        
      </c:barChart>
    </c:plotArea>
	<c:legend>
      
    </c:legend>
  </c:chart>
  
</c:chartSpace>

For WordprocessingML and PresentationML documents, the data for a chart is not stored in the Chart part directly. Instead, it shall be stored in an embedded SpreadsheetML package (§12.2) targeted by an Embedded Package (§15.2.10) part specified by that Chart part. For SpreadsheetML documents, the data for a chart is stored directly in the Drawing’s parent worksheet; no embedded SpreadsheetML package shall be used.

A Chart part shall be located within the package containing the source relationship (expressed syntactically, the @TargetMode attribute of the <Relationship> element shall be Internal).

A Chart part is permitted to have explicit relationships to the following parts defined by this Standard:

A Chart part shall not have any implicit or explicit relationships to any other part defined by this Standard.