-
Notifications
You must be signed in to change notification settings - Fork 558
excel chart pie
zmworm edited this page Apr 13, 2026
·
17 revisions
A dedicated page for pie and doughnut chart types. Both display
proportional data as slices of a circle; doughnut adds a center hole.
Path: /{SheetName}/chart[N]
See also: Chart - add, Chart - set.
| Type string | OOXML element | Description |
|---|---|---|
pie |
c:pieChart |
Standard 2D pie |
pie3d |
c:pie3DChart |
3D pie with perspective |
doughnut |
c:doughnutChart |
Ring chart with center hole |
| Property | Default | Notes |
|---|---|---|
holeSize |
50 | Ring thickness as % of radius (0-100). Only for doughnut. |
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=doughnut --prop holeSize=75 \
--prop data="Share:40,30,20,10" --prop categories="A,B,C,D"| Property | Default | Notes |
|---|---|---|
explosion / explode
|
0 | Pull all slices outward (0-400) |
series{N}.point{M}.explosion |
0 | Per-slice explosion |
# Explode all slices
officecli set data.xlsx /Sheet1/chart[1] --prop explosion=25
# Explode just the first slice
officecli set data.xlsx /Sheet1/chart[1] --prop series1.point1.explode=30| Property | Default | Notes |
|---|---|---|
firstSliceAngle / sliceAngle
|
0 | Rotation of first slice in degrees (0-360) |
officecli set data.xlsx /Sheet1/chart[1] --prop firstSliceAngle=90Pie/doughnut charts use per-data-point colors (not per-series). The
colors property sets the palette; individual points can be overridden.
| Property | Default | Notes |
|---|---|---|
colors |
theme accents | Comma-separated hex colors for slices |
point{N}.color |
— | Override individual slice color |
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=pie \
--prop data="Market:40,30,20,10" \
--prop categories="A,B,C,D" \
--prop colors="4472C4,ED7D31,70AD47,FFC000"
# Override one slice
officecli set data.xlsx /Sheet1/chart[1] --prop point3.color=FF0000Pie/doughnut charts support percentage labels and category name labels in addition to value labels.
| Property | Default | Notes |
|---|---|---|
dataLabels |
false |
true, percent, value, category, all
|
labelPos |
bestFit |
center, insideEnd, outsideEnd, bestFit. Doughnut ignores labelPos.
|
officecli set data.xlsx /Sheet1/chart[1] --prop dataLabels=percent# Basic pie
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=pie \
--prop title="Market Share" \
--prop data="Share:40,30,20,10" \
--prop categories="Product A,Product B,Product C,Other"
# 3D pie with explosion
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=pie3d \
--prop title="Revenue Split" \
--prop data="Rev:55,25,20" --prop categories="US,EU,APAC" \
--prop explosion=15
# Doughnut with thin ring
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=doughnut \
--prop title="Status" \
--prop data="Status:70,30" --prop categories="Complete,Remaining" \
--prop holeSize=80 --prop colors="4CAF50,E0E0E0"| Feature | Preview | Notes |
|---|---|---|
| 2D pie slices | Yes | SVG arc paths |
| Doughnut ring | Yes | Concentric arcs with hole |
| Per-slice colors | Yes | From theme or custom |
| Data labels (%, value) | Yes | Suppressed for slices <5% |
| 3D pie | Yes | Ellipse distortion with depth |
| Explosion | No | Stored in OOXML but not rendered |
-
Doughnut ignores
labelPos. OOXML schema does not allowdLblPoson doughnut charts; the property is silently skipped. - Single series only. Pie/doughnut charts take one series; multiple series are not supported.
-
varyColorsis always true. Automatically set so each slice gets its own color from the palette.
Based on OfficeCLI v1.0.43