Skip to content

word chart add

zmworm edited this page Mar 20, 2026 · 52 revisions

Word: Chart - add

Add an embedded chart with configurable type, data series, categories, and styling.

Parent: /body

Properties

Property Default Description
chartType/type column column, bar, line, pie, doughnut, area, scatter, combo, bubble, radar/spider, stock/ohlc + modifiers (stacked, percentStacked, 3d)
title - Title
data - Series1:1,2,3;Series2:4,5,6
series1, series2, ... - Individual series (Name:val1,val2)
categories - Comma-separated labels
colors auto Comma-separated hex colors
width, height - Size (EMU)
legend - true/false, top, bottom, left, right, none
dataLabels - Show labels
axisTitle, catTitle - Axis titles
axisMin, axisMax, majorUnit - Axis scale
axisNumFmt - Number format
comboSplit - Bar series count for combo
labelPos/labelposition - Label position: center/ctr, insideEnd/inside, insideBase/base, outsideEnd/outside, bestFit/best/auto, top/t, bottom/b, left/l, right/r
labelFont - Label font: "size:color:bold" e.g. "10:FF0000:true"
gridlines/majorGridlines - true, none/false, or "color:widthPt:dash"
minorGridlines - Same format as gridlines
plotFill/plotAreaFill - Plot area background (hex color)
chartFill/chartAreaFill - Chart area background (hex color)
lineWidth - Line width in pt
lineDash/dash - solid, dot, dash, dashdot, longdash, longdashdot, longdashdotdot
marker/markers - "style:size:color" e.g. "circle:8:FF0000". Styles: circle, diamond, square, triangle, star, x, plus, dash, dot, none
style/styleId - Chart style (1-48, or none)
transparency - Series transparency (0-100%)
opacity/alpha - Series opacity (0-100%)
gradient - "color1-color2:angle"
gradients - Per-series gradients (semicolon-separated)
secondaryAxis/secondary - Comma-separated 1-based series indices for secondary axis

Examples

officecli add report.docx /body --type chart --prop chartType=bar --prop title="Revenue" --prop categories="Q1,Q2,Q3,Q4" --prop series1="2024:100,200,150,300" --prop series2="2023:80,180,140,250"

# Radar chart
officecli add report.docx /body --type chart --prop chartType=radar --prop title="Skills" --prop categories="Code,Design,PM" --prop data="Team:8,6,7"

# Bubble chart
officecli add report.docx /body --type chart --prop chartType=bubble --prop title="Market" --prop categories="10,20,30" --prop series1="Products:100,200,150"

# Stock chart (OHLC)
officecli add report.docx /body --type chart --prop chartType=stock --prop categories="Mon,Tue,Wed" --prop series1="Open:100,102,101" --prop series2="High:105,108,106" --prop series3="Low:98,100,99" --prop series4="Close:103,101,104"

Based on OfficeCli v1.0.9

Clone this wiki locally