Appearance
Interface: StrokeProps ​
A stroke, stated once.
Width, dash, colour, transparency and cap are one concept, and the library used to spell them five ways: width/size/catAxisLineSize for the measure, type + dashType / style / catAxisLineStyle for the dash, HexColor / Color / bare string for the paint. This is that vocabulary; BorderProps is an alias of it, and the chart option bag now takes it wherever it used to spell a stroke by hand.
Defaults are per site, not per interface — a table border's absent width is 1 pt, a chart gridline's is whatever DEF_CHART_GRIDLINE says — so each consumer documents its own rather than this type claiming one for all of them.
ShapeLineProps is deliberately not an alias: a shape stroke is a paint, so its type names a fill kind (gradient, pattern, …) rather than the three-way dash switch below. The keys the two share (width, dashType, cap, transparency) already agree.
Extended by ​
Properties ​
cap? ​
optionalcap?:LineCap
Line end cap style
Default ​
ts
'flat'color? ​
optionalcolor?:string
Stroke colour — a 6-digit hex RGB or a SchemeColor token.
Examples ​
ts
'FF3399'ts
SchemeColor.accent1dashType? ​
optionaldashType?:"dash"|"solid"|"dot"|"lgDash"|"dashDot"|"lgDashDot"|"lgDashDotDot"|"sysDash"|"sysDot"|"sysDashDot"|"sysDashDotDot"
Dash pattern, over the full ST_PresetLineDashVal set, so any dash a source deck can carry can also be authored.
type is only a coarse three-way switch, so every dashed stroke it can express collapses onto sysDash. Set this to pick the exact a:prstDash preset instead: dashType: 'lgDashDot' emits <a:prstDash val="lgDashDot"/>.
Precedence. When both are set, dashType wins over type for the dash pattern — { type: 'solid', dashType: 'sysDot' } draws a dotted rule. The one exception is type: 'none', which suppresses the stroke entirely and is decided before any dash pattern is chosen. An unrecognized value warns and falls back to what type implies.
Example ​
ts
{ type: 'solid', color: '999999', dashType: 'lgDash' }transparency? ​
optionaltransparency?:number
Stroke transparency (percent, 0-100).
- MS-PPT > Format Shape > Fill & Line > Line > Transparency
Default ​
ts
0type? ​
optionaltype?:"none"|"dash"|"solid"
Coarse three-way switch: 'none' suppresses the stroke, 'dash' asks for a dashed one, 'solid' for an unbroken one.
width? ​
optionalwidth?:number
Stroke width, in points.
- MS-PPT > Format Shape > Fill & Line > Line > Width