Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

excel chart pie

zmworm edited this page Apr 13, 2026 · 17 revisions

Excel: Chart - pie / doughnut

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.

Chart type variants

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

Pie/doughnut-specific properties

Hole size (doughnut only)

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"

Slice explosion

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

First slice angle (pie only)

Property Default Notes
firstSliceAngle / sliceAngle 0 Rotation of first slice in degrees (0-360)
officecli set data.xlsx /Sheet1/chart[1] --prop firstSliceAngle=90

Per-slice colors

Pie/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=FF0000

Data labels

Pie/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

Examples

# 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"

HTML preview support

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

Known quirks

  • Doughnut ignores labelPos. OOXML schema does not allow dLblPos on doughnut charts; the property is silently skipped.
  • Single series only. Pie/doughnut charts take one series; multiple series are not supported.
  • varyColors is always true. Automatically set so each slice gets its own color from the palette.

See Also


Based on OfficeCLI v1.0.43

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /