chart

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

ParameterTypeInputDescription

name

String

[required] Name of shape to update/manipulate. Find shape names here.

title

String

[optional] Shorthand way of adding text to a chart's title

categoryTitle

String

[optional] Shorthand way of adding text to a chart's category axis title

valueTitle

String

[optional] Shorthand way of adding text to a chart's value axis title

data

Object

[optional] Data to populate a chart. See data object for more information.

settings

Object

[optional] Customise specific chart properties. See settings object for more information.

is_hidden

Boolean

true; false

[optional] Hide shape

remove

Boolean

true; false

[optional] Delete shape

JSON payload

"shapes": [
  {
    "name": "string",
    "title": "string",
    "categoryTitle": "string",
    "valueTitle": "string",
    "data": [],
    "settings": []
    "is_hidden": boolean,
    "remove": boolean,
   },
  {
    "name": "string",
    "title": "string",
    "categoryTitle": "string",
    "valueTitle": "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

ParameterTypeInputDescription

chartFont

String

MS supported font names

[optional] The text font applies to all text in the chart shape

chartFontSize

Integer

1 to 4000

[optional] The text font size applies to all text in the chart shape

fill_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Chart background fill color

JSON payload

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

Legend

ParameterTypeInputDescription

chartShowLegend

Boolean

true, false

[optional] Enable/disable legend

chartLegendPosition

String

Left,

Right,

Bottom,

Top,

Topright,

None

[optional] Set Chart series label / legend display position, if visible

chartLegendFontColor

String

Color name, RGB(0,0,0),

Hex

[optional] Set chart legend color – applies all legend items i.e. not individual series, if visible

isChartLegendBold

Boolean

true, false

[optional] Enable/disable chart legend text bold, if visible

JSON payload

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

Data labels

ParameterTypeInputDescription

isChartLabelValueVisible

Boolean

true, false

[optional] Enable/ disable data label

chartDataLabelPosition

String

Left,

Right,

Top,

Bottom,

Center,

InsideBase,

InsideEnd,

OutsideEnd,

BestFit

[optional] Set data label position, if enabled

chartDataLabelFontSize

Integer

1 to 4000

[optional] Set data label's font size, if data label visible

chartDataLabelFont

String

MS supported font names

[optional] Set data label's font, if data label visible

isDataLabelBold

Boolean

true, false

[optional] Enable/ disable chart data value label bold, if data label visible

chartDataLabelColor

String

Color name, RGB(0,0,0),

Hex

[optional] Chart data value label color, if data label visible

JSON payload

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

Category axis

ParameterTypeInputDescription

chartCategoryAxisFont

String

MS supported font names

[optional] Set axis font type

chartCategoryAxisFontSize

Integer

1 to 4000

[optional] Set axis font size

isCategoryAxisBold

Boolean

true, false

[optional] Enable/ disable bold

chartCategoryAxisColor

String

Color name, RGB(0,0,0),

Hex

[optional] Set axis text color

chartCategoryAxisPosition

String

nextToAxis,

high,

low,

none

[optional] Set axis position

chartCategoryAxisMax

String

[optional] Set axis maximum value

chartCategoryAxisMin

String

[optional] Set axis maximum value

JSON payload

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

Value axis

ParameterTypeInputDescription

chartValueAxisFont

String

MS supported font names

[optional] Set axis font type

chartValueAxisFontSize

Integer

1 to 4000

[optional] Set axis font size

isValueAxisBold

Boolean

true, false

[optional] Enable/ Disable bold

chartValueAxisColor

String

Color name, RGB(0,0,0),

Hex

[optional] Set axis font color

chartValueAxisPosition

String

nextToAxis,

high,

low,

none

[optional] Set axis position

chartValueAxisMax

String

[optional] Set axis maximum value

chartValueAxisMin

String

[optional] Set axis minimum value

JSON payload

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

Plot area

NameTypeInputDescription

isLabelValueVisible

Boolean

true, false

[optional] Enable/ disable data labels

showChartVerticalGridLines

Boolean

true, false

[optional] Enable/ disable vertical grid lines

showChartHorizantalGridLines

Boolean

true, false

[optional] Enable/ disable horizontal grid lines

chartOverlap

Integer

-100 to 100

[optional] Set series overlap

chartGapWidth

Integer

0 to 500

[optional] Set series gap width

JSON payload

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

General

ParameterTypeInputDescription

width

Integer,

Float

0 to 5963.92

[optional] Set shape width

height

Integer,

Float

0 to 5963.92

[optional] Set shape height

left

Integer,

Float

-5963.92 to 5963.92

[optional] Set left position

top

Integer,

Float

-5963.92 to 5963.92

[optional] Set top position

unit

String

cm,

pt,

points (default value if ‘unit’ field is not specified)

[optional] Set unit of measurement for shape width, height, left, top

JSON payload

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

Last updated