Repository navigation
ppt chart add
goworm edited this page Jun 26, 2026
·
55 revisions
Add charts to a slide with data, series, and styling.
Path: /slide[N] (parent)
| Property | Default | Description |
|---|---|---|
chartType |
column |
Chart type (see types below) |
anchor |
- | Shorthand x,y,w,h (e.g. anchor=2cm,4cm,20cm,12cm) — equivalent to setting x/y/width/height individually. Available on Add and Set. |
title |
- | Chart title |
data |
- | Inline data (Series1:1,2,3;Series2:4,5,6) |
series1, series2, ... |
- | Named series (Name:val1,val2,val3) |
categories |
- | Comma-separated category labels |
colors |
auto | Comma-separated hex colors |
comboSplit |
- | Bar series count for combo charts |
x, y
|
defaults | Position (EMU or units) |
width, height
|
defaults | Size (EMU or units) |
name |
auto | Chart name |
legend |
- |
true/false, top, bottom, left, right, none
|
dataLabels |
- | Show data labels |
axisTitle |
- | Value axis title |
catTitle |
- | Category axis title |
axisMin, axisMax
|
- | Axis scale limits |
majorUnit |
- | Axis major unit |
minorUnit |
- | Axis minor unit |
axisNumFmt |
- | Axis number format |
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 from data points to X axis (line charts) |
hiLowLines |
false |
Show high-low lines (line/stock) |
upDownBars |
false |
Show gain/loss bars between first and last series (line/stock) |
dataTable |
false |
Show data table below chart |
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]"
|
autotitledeleted |
- | Suppress the auto-generated 'Chart Title' placeholder (true/false) |
axisposition/axispos
|
- | Convenience shortcut for axis tick label position / cross-between |
bubbleScale/bubblescale
|
- | Bubble chart scale (% of default). Bubble charts only |
catAxisVisible/cataxis.visible
|
- | Hide/show the category axis (true/false) |
valaxisvisible/valaxis.visible
|
- | Hide/show the 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 chart with per-series chart types, comma-separated (e.g. "column,column,line") |
crossBetween/crossbetween
|
- | Category axis cross-between behavior (between/midCat) |
crosses |
autoZero |
Where the value axis crosses the category axis (autoZero, max, min) |
crossesAt/crossesat
|
- | Value-axis crossesAt value |
decreaseColor |
- | Waterfall: negative bar color (add-time only) |
increaseColor |
- | Waterfall: positive bar color (add-time only) |
totalColor |
- | Waterfall: subtotal/total bar color (add-time only) |
firstSliceAngle/firstsliceangle/sliceangle
|
- | Pie/doughnut first slice angle (degrees) |
gapdepth |
- | Depth gap between series in 3D bar/line/area charts (percent) |
holeSize/holesize
|
- | Doughnut hole size (10..90 percent). Doughnut charts only |
labeloffset |
- | Category-axis label offset 0..1000 (percent of font height) |
labelrotation |
- | Tick-label rotation in degrees (-90..90); xaxis.* targets category, yaxis.*/valaxis.* targets value |
leaderlines/showleaderlines
|
- | Show/hide leader lines connecting data labels to slices (pie/doughnut) |
plotvisonly/plotvisibleonly
|
- | If true, skip plotting hidden worksheet rows/columns |
radarstyle |
- | Radar chart subtype: standard/line, marker, filled/fill. Radar charts only |
scatterstyle |
- | Scatter chart subtype: line/lineOnly, lineMarker, marker/markerOnly, smooth/smoothLine, smoothMarker. Scatter charts only |
serlines/serieslines
|
- | Series lines on stacked bar charts (true/false) |
shownegbubbles |
- | Render negative-valued bubbles. Bubble charts only |
sizerepresents |
area |
How bubble size value is mapped: area, width/w. Bubble charts only |
ticklabelskip/tickskip
|
- | Draw tick labels every Nth category (category axis) |
title.overlay/titleoverlay
|
- | If true, title overlays the plot area instead of reserving space above (true/false) |
trendline |
- | Add trendline to every series: type[:order] or type:forward:backward. Types: linear, exp, log, poly, power, movingAvg; none clears |
varyColors |
- | Vary colors by data point (true/false; single-series charts) |
| Base Type | Variants |
|---|---|
column |
columnStacked, columnPercentStacked, column3d
|
bar |
barStacked, barPercentStacked, bar3d
|
line |
lineStacked, linePercentStacked, line3d
|
pie |
pie3d |
doughnut |
|
area |
areaStacked, areaPercentStacked, area3d
|
scatter |
|
bubble |
|
radar |
spider |
stock |
ohlc |
combo |
Mixed chart types via comboSplit
|
waterfall |
wf |
funnel |
|
treemap |
|
sunburst |
|
histogram |
|
boxWhisker |
|
pieOfPie |
Pie chart with a secondary pie for tail values |
barOfPie |
Pie chart with a secondary stacked bar for tail values |
# Bar chart with two series
officecli add slides.pptx /slide[1] --type chart --prop chartType=bar --prop title="Revenue by Quarter" --prop categories="Q1,Q2,Q3,Q4" --prop series1="2024:100,200,150,300" --prop series2="2023:80,180,140,250" --prop x=2cm --prop y=4cm --prop width=20cm --prop height=12cm
# Pie chart
officecli add slides.pptx /slide[2] --type chart --prop chartType=pie --prop title="Market Share" --prop categories="Product A,Product B,Product C" --prop data="Share:40,35,25" --prop colors=4472C4,ED7D31,A5A5A5
# Line chart with axis titles
officecli add slides.pptx /slide[1] --type chart --prop chartType=line --prop title="Trend" --prop categories="Jan,Feb,Mar,Apr" --prop series1="Sales:10,20,15,30" --prop axisTitle="USD" --prop catTitle="Month" --prop legend=bottom
# Radar chart
officecli add slides.pptx /slide[1] --type chart --prop chartType=radar --prop title="Skills" --prop categories="Code,Design,PM" --prop data="Team:8,6,7"
# Bubble chart
officecli add slides.pptx /slide[1] --type chart --prop chartType=bubble --prop title="Market" --prop categories="10,20,30" --prop series1="Products:100,200,150"
# Stock chart (OHLC)
officecli add slides.pptx /slide[1] --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"Per-series add and remove on /slide[N]/chart[M]/series[K]:
# Append a new series (clones last c:ser structure; theme palette color auto-assigned)
officecli add deck.pptx /slide[1]/chart[1] --type series --prop name="2026" --prop data="100,200,150,300"
# Remove a series (survivors renumbered)
officecli remove deck.pptx /slide[1]/chart[1]/series[2]Chart paths support animation Add/Set/Query/Remove:
officecli add deck.pptx /slide[1]/chart[1]/animation --type animation --prop effect=fade --prop chartBuild=byCategory
officecli query deck.pptx /slide[1]/chart[1]/animationchartBuild accepts asOneObject, bySeries, byCategory, bySeriesInCategory, byCategoryInSeries for per-series/category build effects.
Per-attribute axisLine and gridline setters on chart-axis paths:
officecli set deck.pptx /slide[1]/chart[1]/categoryAxis --prop axisLine.color=4472C4 --prop axisLine.width=1pt
officecli set deck.pptx /slide[1]/chart[1]/valueAxis --prop gridline.color=DDDDDD --prop gridline.dash=dashLine charts also emit dropLines/hiLowLines/upDownBars on Get so dump → batch round-trips them.
Based on OfficeCLI v1.0.97