Skip to content

excel chart pie

zmworm edited this page Apr 13, 2026 · 17 revisions

Excel: Chart - pie

A dedicated page for the pie chart type. Pie charts display proportional data as slices of a circle.

Path: /{SheetName}/chart[N]

See also: Chart - add, Chart - set, doughnut for the ring variant.

Chart type variants

Type string OOXML element Description
pie c:pieChart Standard 2D pie
pie3d c:pie3DChart 3D pie with perspective

Pie-specific properties

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

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

Data labels

Property Default Notes
dataLabels false true, percent, value, category, all
labelPos bestFit center, insideEnd, outsideEnd, bestFit
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

HTML preview support

Feature Preview Notes
2D pie slices Yes SVG arc paths
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

  • Single series only. Pie 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