chart

A chart shape is used to render data in a graphical form. All chart types provided by PowerPoint are supported.

JSON payload

"shapes": [
  {
    "name": "string",
    "data": [],
    "settings": []
    "is_hidden": boolean,
    "remove": boolean,
   },
  {
    "name": "string",
    "data": [],
    "settings": []
    "is_hidden": boolean,
    "remove": boolean,
   } 
]

Data Object

The data object is used to populate a chart shape. The data is organized as an array of arrays, where each inner array represents a different dimension of the data.

In the example payload below, the matrix would be of size 4x2, where there are 4 columns (series) and 2 rows (categories). The first column of the matrix would contain the values for the "series 1", the second column would contain the values for the "series 2", and so on. Similarly, the first row of the matrix would contain the values for the "category 1", the second row would contain the values for the "category 2".

JSON payload

"data": [
   [
      "series 1",
      "series 2",
      "series 3",
      "series 4"
   ],
   [
      "category 1",
      "category 2"
   ],
   [
      1,
      2,
      3,
      4
   ],
   [
      5,
      6,
      7,
      8
   ]
]

Settings Object

The settings parameters below are specific to chart shapes only. Chart shape consists of several different elements, like plot area, legend and so on, we have grouped the settings to match these elements below.

Chart Area

JSON payload

"settings": {
    "title": "string",
    "chartFont": "string",
    "chartFontSize": numeric,
    "fill_color": "string"
}

Legend

JSON payload

"settings": {
    "chartShowLegend": boolean,
    "chartLegendPosition": "string",				   
    "chartLegendColor": "string",
    "isChartLegendBold": boolean
}

Data labels

JSON payload

"settings": {
    "isChartLabelValueVisible": boolean,			
    "chartDataLabelPosition": "string",
    "chartDataLabelFontSize": numeric,
    "chartDataLabelFont": "string",
    "isDataLabelBold": boolean,
    "chartDataLabelColor": "string"
}

Category axis

JSON payload

"settings": {  
    "categoryTitle": "string",
    "chartCategoryAxisMax": "numeric"
    "chartCategoryAxisMin": "numeric"
    "chartCategoryAxisPosition": "string",
    "chartCategoryAxisFontSize": numeric,
    "chartCategoryAxisFont": "string",
    "isCategoryAxisBold": boolean,
    "chartCategoryAxisColor": "string"
}

Value axis

JSON payload

"settings": {
    "valueTitle": "string",
    "chartValueAxisPosition": "string",
    "chartValueAxisFont": "string",
    "chartValueAxisFontSize": numeric,		 
    "isValueAxisBold": boolean,		 
    "chartValueAxisColor": "string",
    "chartValueAxisMin": "numeric",
    "chartValueAxisMax": "numeric"
}

Plot area

JSON payload

"settings": {
    "isLabelValueVisible": boolean
    "showChartVerticalGridLines": boolean,
    "showChartHorizantalGridLines": boolean,
    "chartOverlap": numeric,
    "chartGapWidth": numeric
}

Size & Position

JSON payload

"settings": {
  "height": numeric,
  "width": numeric,
  "top": numeric,
  "left": numeric,
  "unit": "string"
}

Last updated