Skip to content

word chart add

goworm edited this page Jun 26, 2026 · 53 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, column3d, bar, bar3d, line, pie, doughnut, area, scatter, combo, bubble, radar/spider, stock/ohlc, waterfall/wf, funnel, treemap, sunburst, histogram, boxWhisker + 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, gradient "C1-C2[:angle]", or "none"
chartFill/chartAreaFill - Chart area background: hex color, gradient "C1-C2[:angle]", or "none"
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
smooth false Smooth line curves (line/scatter only)
showMarker/showMarkers - Toggle markers on line charts
dropLines false Show vertical drop lines (line charts)
hiLowLines false Show high-low lines (line/stock)
upDownBars false Show gain/loss bars (line/stock)
serLines/seriesLines false Show series connector lines
dataTable false Show data table below chart
referenceLine/refLine - Reference line: value or "value:color:width:dash"
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
title.font/titlefont - Title typeface (font name)
title.size/titlesize - Title font size (pt)
title.color/titlecolor - Title font color (hex)
title.bold/titlebold - Title bold (true/false)
title.glow/titleglow - Title glow: "COLOR-RADIUS-OPACITY" or "none"
title.shadow/titleshadow - Title shadow: "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none"
legendfont/legend.font - Legend font: "size:color:fontname" e.g. "9:8B949E:Helvetica Neue"
axisfont/axis.font - Axis label font: "size:color:fontname" e.g. "10:58626E:Arial"
series.shadow/seriesshadow - Series shadow: "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none"
series.outline/seriesoutline - Series outline: "COLOR-WIDTH" e.g. "FFFFFF-0.5" or "none"
gapwidth/gap - Bar gap width (0-500)
overlap - Bar overlap (-100 to 100)
view3d/camera/perspective - 3D rotation: "rotX,rotY,perspective" e.g. "15,20,30"
areafill/area.fill - Area gradient fill: "C1-C2[:angle]"
radarstyle - Radar subtype (radar): standard/line, marker, filled/fill
autotitledeleted - Suppress the auto-generated "Chart Title" placeholder (true/false)
axisposition/axispos - Axis tick-label position / cross-between shortcut (e.g. top)
bubbleScale - Bubble chart scale (% of default, bubble only)
catAxisVisible/cataxis.visible - Show/hide category axis (true/false)
valaxisvisible/valaxis.visible - Show/hide value axis (true/false)
chartborder/chartarea.border - Chart-area outer border line: color:width:dash or none
plotborder/plotarea.border - Plot-area border line: color, color:width, color:width:dash, or none
combotypes/combo.types - Rebuild as combo with per-series types, comma-separated one per series (e.g. "column,column,line")
crossBetween - Category axis cross-between: between / midCat
crosses - Where value axis crosses category axis: autoZero (default), max, min
crossesAt - Value-axis crosses-at numeric value
dispBlanksAs - How empty cells render: gap, zero, span
firstSliceAngle/sliceangle - Pie/doughnut first slice angle (degrees)
gapdepth - Depth gap between series in 3D bar/line/area charts (percent)
holeSize - Doughnut hole size (10-90 percent)
leaderlines/showleaderlines - Show/hide leader lines connecting labels to slices (pie/doughnut)
plotvisonly/plotvisibleonly - Skip plotting hidden worksheet rows/columns (true/false)
shownegbubbles - Render negative-valued bubbles (bubble only)
sizerepresents - How bubble size maps: area (default), width/w (bubble only)
title.overlay/titleoverlay - Title overlays the plot area instead of reserving space above (true/false)
trendline - Trendline per series: type[:order] or type:forward:backward (linear, exp, log, poly, power, movingAvg); none clears
valaxisline/valaxis.line - Value-axis line: color:width:dash
varyColors - Vary colors by data point (true/false; single-series charts)
increaseColor - Waterfall: positive bar color (add-time only)
decreaseColor - Waterfall: negative bar color (add-time only)
totalColor - Waterfall: subtotal/total bar color (add-time only)

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.64

Clone this wiki locally