Chart resource type

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

Represents a chart object in a workbook.

Methods

Method Return Type Description
Get Chart Chart Read properties and relationships of chart object.
Create ChartSeries ChartSeries Create a new ChartSeries by posting to the series collection.
List series ChartSeries collection Get a ChartSeries object collection.
Update Chart Update Chart object.
Image Image base64 encoded string Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions.
Delete None Deletes the chart object.
Setdata None Resets the source data for the chart.
Setposition None Positions the chart relative to cells on the worksheet.
List Chart collection Get chart object collection.
Itemat Chart Gets a chart based on its position in the collection.
Add Chart Creates a new chart.

Properties

Property Type Description
height double Represents the height, in points, of the chart object.
id string Gets a chart based on its position in the collection. Read-only.
left double The distance, in points, from the left side of the chart to the worksheet origin.
name string Represents the name of a chart object.
top double Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart).
width double Represents the width, in points, of the chart object.

Relationships

Relationship Type Description
axes ChartAxes Represents chart axes. Read-only.
dataLabels ChartDataLabels Represents the datalabels on the chart. Read-only.
format ChartAreaFormat Encapsulates the format properties for the chart area. Read-only.
legend ChartLegend Represents the legend for the chart. Read-only.
series ChartSeries collection Represents either a single series or collection of series in the chart. Read-only.
title ChartTitle Represents the title of the specified chart, including the text, visibility, position and formating of the title. Read-only.
worksheet Worksheet The worksheet containing the current chart. Read-only.

JSON representation

Here is a JSON representation of the resource.

{
  "height": 1024,
  "id": "string",
  "left": 1024,
  "name": "string",
  "top": 1024,
  "width": 1024
}