-
Notifications
You must be signed in to change notification settings - Fork 513
excel chart area
zmworm edited this page Apr 29, 2026
·
16 revisions
A dedicated page for the area chart type. Area charts are like line
charts with the space between the line and the X axis filled with color,
useful for showing magnitude over time and comparing cumulative totals.
Path: /{SheetName}/chart[N]
Add command shape:
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=area \
--prop title="Cumulative Revenue" \
--prop series1="Revenue:100,200,300,400" \
--prop categories="Q1,Q2,Q3,Q4" \
<styling props>See also: Chart - add, Chart - set.
| Type string | Grouping | 3D |
|---|---|---|
area |
Standard (overlapping) | No |
areaStacked |
Stacked | No |
areaPercentStacked |
PercentStacked (0-100%) | No |
area3d |
Standard | Yes |
| Property | Default | Notes |
|---|---|---|
areaFill / area.fill
|
— | Gradient fill: "C1-C2[:angle]"
|
gradient |
— | Per-series gradient |
gradients |
— | Per-series gradients (semicolon-separated) |
# Stacked area with gradient fills
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=areaStacked \
--prop title="Revenue by Region" \
--prop data="East:100,200,300;West:80,150,250" \
--prop categories="Q1,Q2,Q3" \
--prop transparency=30
# 3D area
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=area3d \
--prop title="Trends" \
--prop data="A:10,20,30;B:15,25,35" \
--prop categories="X,Y,Z" \
--prop view3d="15,20,30"| Property | Default | Notes |
|---|---|---|
title |
— | Chart title text |
title.font / titleFont
|
— | Font family |
title.size / titleSize
|
— | Font size (pt) |
title.color / titleColor
|
— | Font color (hex) |
title.bold / titleBold
|
— | Bold (true/false) |
title.glow / titleGlow
|
— | Glow: "COLOR-RADIUS-OPACITY" or "none"
|
title.shadow / titleShadow
|
— | Shadow: "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none"
|
| Property | Default | Notes |
|---|---|---|
legend |
true |
Position: top, bottom, left, right, none
|
legend.overlay |
false |
Float legend on top of the chart |
legendFont / legend.font
|
— | "size:color:fontname" |
| Property | Default | Notes |
|---|---|---|
axisMin / min
|
(auto) | Value axis lower bound |
axisMax / max
|
(auto) | Value axis upper bound |
majorUnit |
(auto) | Major gridline / tick interval |
minorUnit |
(auto) | Minor gridline / tick interval |
axisNumFmt / axisNumberFormat
|
General |
Number format for tick labels (e.g. "$#,##0", "0%") |
# Lock Y axis to 0-500, gridlines every 100
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=area \
--prop series1="Data:50,120,280,350,400" \
--prop categories="Jan,Feb,Mar,Apr,May" \
--prop axisMin=0 --prop axisMax=500 --prop majorUnit=100| Property | Default | Notes |
|---|---|---|
logBase / logScale
|
— | Logarithmic scale base (e.g. 10) |
| Property | Default | Notes |
|---|---|---|
axisOrientation / axisReverse
|
minMax |
Set to maxMin or true to flip the Y axis |
| Property | Default | Notes |
|---|---|---|
secondaryAxis / secondary
|
— | Comma-separated 1-based series indices for secondary Y axis |
# Volume on left axis, percentage on right axis
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=area \
--prop series1="Volume:1000,2000,3000,4000" \
--prop series2="Rate %:5,8,12,15" \
--prop categories="Q1,Q2,Q3,Q4" \
--prop secondaryAxis=2| Property | Default | Notes |
|---|---|---|
dispUnits / displayUnits
|
— |
thousands, millions, billions, etc. |
| Property | Default | Notes |
|---|---|---|
axisVisible / axis.visible
|
true |
Show/hide both axes |
axisLine / axis.line
|
— | Value axis line: "color:width:dash"
|
catAxisLine |
— | Category axis line: "color:width:dash"
|
majorTickMark / majorTick
|
— |
out, in, cross, none
|
minorTickMark / minorTick
|
— | Same as major tick |
tickLabelPos |
nextTo |
nextTo, high, low, none
|
| Property | Default | Notes |
|---|---|---|
gridlines / majorGridlines
|
true |
Toggle or configure: true, false/none, or "color:widthPt:dash"
|
minorGridlines |
false |
Same format as gridlines
|
# Custom gridlines: light gray, thin, dotted
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=area \
--prop series1="Data:100,200,300" --prop categories="A,B,C" \
--prop "gridlines=D0D0D0:0.5:sysDot" \
--prop "minorGridlines=EEEEEE:0.3:sysDot"| Property | Default | Notes |
|---|---|---|
referenceLine / refLine
|
— |
value or "value:color:width:dash"
|
# Target line at 250 — red, dashed
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=area \
--prop series1="Actual:120,180,250,310" \
--prop categories="Q1,Q2,Q3,Q4" \
--prop "referenceLine=250:FF0000:1.5:dash"| Property | Default | Notes |
|---|---|---|
plotFill / plotAreaFill
|
— | Plot area background: hex, gradient "C1-C2[:angle]", or "none"
|
chartFill / chartAreaFill
|
— | Chart area background |
plotArea.border / plotBorder
|
— | Plot area outline: "color:width:dash" or "none"
|
chartArea.border / chartBorder
|
— | Chart area outline |
areaFill / area.fill
|
— | Area gradient fill for area-style rendering |
| Property | Default | Notes |
|---|---|---|
series.shadow / seriesShadow
|
— |
"COLOR-BLUR-ANGLE-DIST-OPACITY" or "none"
|
series.outline / seriesOutline
|
— |
"COLOR-WIDTH" e.g. "FFFFFF-0.5" or "none"
|
| Property | Default | Notes |
|---|---|---|
dataLabels |
false |
Toggle data labels |
labelPos / labelPosition
|
— | Position: center, insideEnd, insideBase, outsideEnd, top, bottom, left, right, bestFit
|
labelFont |
— | "size:color:bold" |
dataLabel{N}.text |
— | Custom text for individual label |
dataLabel{N}.x/y/w/h |
— | Manual layout of individual label |
dataLabel{N}.delete |
— | Hide individual label |
dataLabels.separator |
— | Separator between label parts |
dataLabels.numFmt |
— | Number format for labels |
| Property | Default | Notes |
|---|---|---|
transparency |
0 | Series transparency (0-100%) |
opacity / alpha
|
100 | Series opacity (0-100%) |
# Translucent areas for layered comparison
officecli set data.xlsx /Sheet1/chart[1] --prop transparency=40| Property | Default | Notes |
|---|---|---|
x, y
|
0 |
Chart position (column/row index) |
width |
8 |
Chart width (column units) |
height |
15 |
Chart height (row units) |
plotArea.x/y/w/h |
— | Manual plot area layout (0-1 decimal) |
title.x/y/w/h |
— | Manual title layout |
legend.x/y/w/h |
— | Manual legend layout |
| Property | Default | Notes |
|---|---|---|
dispBlanksAs / blanksAs
|
gap |
How blank cells are handled: gap, zero, span/connect
|
| Property | Default | Notes |
|---|---|---|
colorRule / conditionalColor
|
— | Color data points conditionally |
point{N}.color |
— | Individual data point color (hex) |
| Property | Default | Notes |
|---|---|---|
view3d / camera / perspective
|
— |
"rotX,rotY,perspective" e.g. "15,20,30"
|
Applies only to area3d chart type.
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=areaStacked \
--prop title="Revenue by Region" \
--prop title.size=16 --prop title.bold=true \
--prop title.font="Arial" --prop title.color=1F2937 \
--prop series1="East:100,200,300,400" \
--prop series2="West:80,150,250,350" \
--prop series3="South:60,100,180,280" \
--prop categories="Q1,Q2,Q3,Q4" \
--prop colors="4472C4,ED7D31,70AD47" \
--prop transparency=20 \
--prop "gridlines=E5E7EB:0.5:solid" \
--prop "minorGridlines=F3F4F6:0.3:sysDot" \
--prop axisTitle="Revenue ($K)" --prop catTitle="Quarter" \
--prop "axisfont=10:6B7280:Arial" \
--prop plotFill=FAFBFC \
--prop "referenceLine=300:FF0000:1:dash" \
--prop legend=bottom \
--prop "legendfont=9:6B7280:Arial" \
--prop x=0 --prop y=0 --prop width=14 --prop height=20| Feature | Preview | Notes |
|---|---|---|
| Filled area | Yes | Polygon fill |
| Stacked / percent stacked | Yes | Cumulative polygon stacking |
| Gridlines | Yes | Color, width, dash from OOXML |
| Reference lines | Yes | Dashed overlays with legend entry |
| Data labels | Yes | Value text on areas |
| Custom axis scale | Yes | axisMin/axisMax/majorUnit |
| Log scale | Yes | Logarithmic Y axis spacing |
| Reversed axis | Yes | Inverted Y direction |
| 3D area | No | Falls back to 2D |
| Shadow effects | No | Decorative; not rendered |
| Glow effects | No | Decorative; not rendered |
-
Stacked area type is set at creation. You cannot change an
areatoareaStackedviaset— recreate the chart with the desired type. -
3D area charts fall back to 2D in preview.
area3dis rendered as a flat 2D area chart in the HTML preview. Use Excel for 3D QA. - Transparency interacts with stacking. In stacked area charts, transparency reveals lower series through upper ones. This is faithfully rendered in the HTML preview.
# List all charts
officecli query data.xlsx chart
# Inspect a specific chart
officecli get data.xlsx "/Sheet1/chart[1]"
# Render to HTML preview
officecli view data.xlsx html > preview.html- Chart - Overview of chart operations
- Chart add - Generic chart add (all types)
- Chart set - Modify existing charts
- Chart get - Read back chart properties
Based on OfficeCLI v1.0.64