You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zmworm edited this page Apr 19, 2026
·
15 revisions
Excel: Chart - line
A dedicated page for the line chart type. Line charts connect data
points with straight or smooth lines and are the go-to for time series,
trend analysis, and multi-series comparison. Line charts support the
richest set of decorative elements in the OOXML spec: markers, dash
patterns, smooth curves, drop lines, high-low lines, up-down bars, data
tables, reference lines, and dual axes.
When enabled, data points are connected with Catmull-Rom cubic Bezier
curves instead of straight line segments. The HTML preview faithfully
renders the smooth path via SVG <path> with cubic Bezier commands.
# Diamond markers, size 8
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=line \
--prop series1="Data:10,20,30" --prop categories="A,B,C" \
--prop marker="diamond:8"# Per-series: circles for actuals, none for forecast
officecli set data.xlsx /Sheet1/chart[1] \
--prop series1.marker="circle:6:4472C4" \
--prop series2.marker=none
# Hide all markers
officecli set data.xlsx /Sheet1/chart[1] --prop showMarker=false
Line elements (line chart decorations)
These elements are unique to line and stock charts. They add vertical
connectors, range indicators, and gain/loss bars between series.
Property
Default
Notes
dropLines
false
Vertical lines from each data point down to the X axis
hiLowLines
false
Vertical lines connecting the highest and lowest series values at each category
upDownBars
false
Gain/loss bars between the first and last series
serLines / seriesLines
false
Series connector lines (stacked bar / pie-of-pie)
# Drop lines — visual anchoring to the X axis
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=line \
--prop series1="East:120,135,148,162" \
--prop series2="West:95,108,115,128" \
--prop categories="Q1,Q2,Q3,Q4" \
--prop dropLines=true
# High-low lines — stock chart style range display
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=line \
--prop series1="High:150,165,140,170" \
--prop series2="Low:100,110,95,120" \
--prop categories="Q1,Q2,Q3,Q4" \
--prop hiLowLines=true
# Up-down (gain/loss) bars between open and close
officecli add data.xlsx /Sheet1 --type chart \
--prop chartType=line \
--prop series1="Open:120,135,148,130" \
--prop series2="Close:135,128,162,145" \
--prop categories="Mon,Tue,Wed,Thu" \
--prop upDownBars=true
Line element styling: Drop lines, high-low lines, and up-down bars
each carry their own spPr for color, width, and dash pattern. These
are extracted from OOXML and faithfully rendered in the HTML preview.
Up-down bar fill colors default to green (#4CAF50) for gains and red
(#F44336) for losses when not specified in the OOXML.
Reference lines are horizontal overlays drawn at a constant value.
They appear in the legend and are rendered in the HTML preview with
the correct dash pattern.
smooth is chart-level AND per-series. The chart-level smooth
sets the default; individual series can override it. When reading back
via get, both the chart-level and per-series values are reported.
3D line charts fall back to 2D in preview.line3d is rendered
as a flat 2D line chart in the HTML preview. Use Excel for 3D QA.
Stacked line type is set at creation. You cannot change a line
to lineStacked via set — recreate the chart with the desired type.
Inspect an existing line chart
# List all charts
officecli query charts-line.xlsx chart
# Inspect a specific chart (shows all series with lineWidth, lineDash, smooth, marker, etc.)
officecli get charts-line.xlsx "/1-Line Fundamentals/chart[1]"# Render to HTML preview
officecli view charts-line.xlsx html > preview.html