Skip to content

excel chart series

goworm edited this page Jun 26, 2026 · 1 revision

Excel: Chart Series

Per-series styling and data for an embedded chart — fill, line, markers, error bars, and the values/categories backing each plotted series.

Path: /SheetName/chart[N]/series[K]

Operations

  • add - Series are added as dotted props on the parent chart (e.g. series1.name, series1.values)
  • set - Modify an existing series in place (/SheetName/chart[N]/series[K])
  • get - Read back series attributes
  • remove - Delete a series

add

At Add time, series are passed as dotted props on the parent chart, not on series[K]. Prefix each key with seriesN. (e.g. series1.name, series1.values).

Parent: /SheetName/chart[N]

Property Required/Default Description
values required Comma-separated numbers, OR a cell range reference (e.g. Sheet1!$B$2:$B$5)
name (alias title) Series name shown in legend and data labels
color Series fill color (#RRGGBB or bare hex)
categories Per-series category override; range reference only
bubbleSize Bubble chart per-point sizes; comma-separated numbers OR a cell range reference. Defaults to the y-values when omitted. (bubble charts only)
bubbleSizeRef A1 cell range backing bubble per-point sizes. Coexists with bubbleSize (the literal becomes the numCache). (bubble charts only)

set

Property Required/Default Description
name (alias title) Series name shown in legend and data labels
values Comma-separated numbers, OR a cell range reference (e.g. Sheet1!B2:B13)
categories Per-series category override; range reference only
color Series fill color (#RRGGBB or bare hex)
lineWidth Series line width in points (e.g. 1.5)
lineDash (alias dash) Series line dash style. Accepts user-friendly aliases (dash/dot/dashDot/longDash) as well as OOXML tokens (solid, sysDash, sysDot, sysDashDot, lgDash, lgDashDot, lgDashDotDot). solid is the only round-trip-stable value.
marker Per-series marker symbol: circle, dash, diamond, dot, plus, square, star, triangle, x, none, auto. Supports compound symbol:size:COLOR form (e.g. circle:8:FF0000). Applies to line/scatter/radar series.
markerSize Marker size in points (2–72). Applies when marker is not none.
markerColor (alias marker.color) Per-series marker fill color (line/scatter/radar). Preserves existing symbol and size — pair with marker=/markerSize= to set the triplet independently.
smooth Smooth line interpolation for line/scatter series (true/false)
errBars Error bar value type: fixed, percent, stddev, stderr (aliases: fixedValue, percentage/pct, standardDeviation, standardError). Pass none to clear. Silently ignored on series types that don't support error bars.
invertIfNeg Invert color for negative values. Bar/column/area/pie series only; line/scatter silently ignore.

get Attributes

Attribute Type Description
name string Series name
nameRef string A1 cell reference backing the series name
values string Series values
valuesRef string A1 cell range backing the series values
categories string Per-series category override
categoriesRef string A1 cell range backing the category labels
color color Series fill color (#-prefixed uppercase hex)
alpha number Series fill alpha in OOXML units (0..100000 = 0..100%)
outlineColor color Per-series outline color (#RRGGBB or scheme reference)
lineWidth number Series line width in points
lineDash enum Series line dash style (OOXML preset dash token)
marker string Marker symbol name
markerSize number Marker size
markerColor string Marker fill color (e.g. #FF0000)
smooth string true / false
errBars string OOXML errValType token
invertIfNeg string true / false
scatterStyle string Scatter sub-style (line/lineMarker/marker/smooth/smoothMarker/none)
secondaryAxis bool true when the chart has more than one value axis (this series uses the secondary)
trendline.dispEq bool Trendline displayEquation flag
trendline.dispRSqr bool Trendline displayRSquaredValue flag
dataLabels.numFmt string Per-series data label number format
dataLabels.separator string Per-series data label separator string
bubbleSize string Bubble per-point sizes (comma-separated cached values)
bubbleSizeRef string A1 cell range backing bubble per-point sizes

Examples

# Add a series to an existing chart (dotted props on the parent chart)
officecli add data.xlsx /Sheet1/chart[1] --type chart-series \
  --prop series1.name="Q1" \
  --prop series1.values="120,150,180,210" \
  --prop series1.color=#4472C4

# Add a series backed by a cell range, with category override
officecli add data.xlsx /Sheet1/chart[1] --type chart-series \
  --prop series1.name="Revenue" \
  --prop series1.values="Sheet1!\$B\$2:\$B\$5" \
  --prop series1.categories="Sheet1!\$A\$2:\$A\$5"

# Add a bubble series with explicit sizes
officecli add data.xlsx /Sheet1/chart[1] --type chart-series \
  --prop series1.name="Product A" \
  --prop series1.values="120,150,180" \
  --prop series1.bubbleSize="10,20,30"

# Style an existing series: line width + dash + marker
officecli set data.xlsx /Sheet1/chart[1]/series[1] \
  --prop lineWidth=1.5 \
  --prop lineDash=dash \
  --prop marker="circle:8:FF0000"

# Smooth a line series and set the marker color independently
officecli set data.xlsx /Sheet1/chart[1]/series[1] \
  --prop smooth=true \
  --prop markerColor=FF0000

# Add error bars (clear them with errBars=none)
officecli set data.xlsx /Sheet1/chart[1]/series[1] --prop errBars=stddev

# Read back series attributes
officecli get data.xlsx /Sheet1/chart[1]/series[1]

# Remove a series
officecli remove data.xlsx /Sheet1/chart[1]/series[1]

Notes

  • At Add time, series pass as dotted props on the parent chart (series1.name, series1.values, series1.color, series1.categories). The per-series Set/Get schema applies after creation, addressed via /SheetName/chart[N]/series[K].
  • Combo charts (mixed chartType / secondary axis) are unsupported — create separate charts instead.
  • lineStyle is not a valid key (rejected as UNSUPPORTED) — use lineWidth + lineDash.
  • lineDash accepts friendly aliases on set but Get returns the OOXML token (sysDash/sysDot/sysDashDot/lgDash). dashDotDot is accepted as an alias for sysDashDotDot. Only solid round-trips unchanged.
  • markerColor preserves the existing marker symbol and size; pair it with marker= and markerSize= to set the full triplet independently.
  • alpha (get) is read back in OOXML units (0..100000), distinct from the chart-level transparency percent input used on Add/Set.

See Also


Based on OfficeCLI v1.0.119

Clone this wiki locally