-
Notifications
You must be signed in to change notification settings - Fork 561
ppt chart set
zmworm edited this page Mar 19, 2026
·
52 revisions
Modify chart properties including title, legend, data labels, and position.
Path: /slide[N]/chart[M]
| Property | Accepted Values | Description |
|---|---|---|
title |
text | Chart title |
legend |
top, bottom, left, right, none
|
Legend position |
dataLabels |
comma-separated: value, category, series, percent, all, none, true
|
Show data labels |
colors |
comma-separated hex | Series colors |
axisTitle / vTitle
|
text | Value axis title |
catTitle / hTitle
|
text | Category axis title |
axisMin / min
|
number | Value axis minimum |
axisMax / max
|
number | Value axis maximum |
majorUnit |
number | Major axis unit interval |
minorUnit |
number | Minor axis unit interval |
axisNumFmt / axisNumberFormat
|
format code | Value axis number format |
categories |
comma-separated | Category labels |
data |
Series1:1,2,3;Series2:4,5,6 |
Chart data (all series) |
series1..seriesN
|
Name:val1,val2 |
Individual series data |
labelPos/labelposition
|
position keyword | Label position: center/ctr, insideEnd/inside, insideBase/base, outsideEnd/outside, bestFit/best/auto, top/t, bottom/b, left/l, right/r
|
labelFont |
"size:color:bold" |
Label font e.g. "10:FF0000:true"
|
gridlines/majorGridlines
|
true, none/false, or "color:widthPt:dash"
|
Major gridlines configuration |
minorGridlines |
same as gridlines
|
Minor gridlines configuration |
plotFill/plotAreaFill
|
hex color | Plot area background |
chartFill/chartAreaFill
|
hex color | Chart area background |
lineWidth |
number (pt) | Line width in pt |
lineDash/dash
|
dash style keyword |
solid, dot, dash, dashdot, longdash, longdashdot, longdashdotdot
|
marker/markers
|
"style:size:color" |
Marker config e.g. "circle:8:FF0000". Styles: circle, diamond, square, triangle, star, x, plus, dash, dot, none
|
style/styleId
|
1-48 or none
|
Chart style |
transparency |
0-100 | Series transparency (%) |
opacity/alpha
|
0-100 | Series opacity (%) |
gradient |
"color1-color2:angle" |
Gradient fill |
gradients |
semicolon-separated | Per-series gradients |
secondaryAxis/secondary
|
comma-separated indices | 1-based series indices for secondary axis |
name |
text | Chart element name |
x, y
|
EMU or units | Position |
width, height
|
EMU or units | Size |
# Update title and legend
officecli set slides.pptx /slide[1]/chart[1] --prop title="Updated" --prop legend=bottom --prop x=1cm --prop width=22cm
# Show data labels
officecli set slides.pptx /slide[1]/chart[1] --prop dataLabels=true
# Reposition chart
officecli set slides.pptx /slide[1]/chart[1] --prop x=2cm --prop y=3cm --prop width=20cm --prop height=12cmBased on OfficeCli v1.0.7