Appearance
@shbernal/pptxgenjs / index / ConnectorProps
Interface: ConnectorProps
Defined in: core-interfaces.ts:459
A connector is a line drawn between two points, emitted as a PowerPoint connector (<p:cxnSp>) so the app treats it as a connector (selectable/reroutable) rather than a plain line shape. Endpoints are given directly; the bounding box and flip flags are derived.
Properties
adj?
optionaladj?:number|number[]
Defined in: core-interfaces.ts:485
Bend position(s) as a percent of the connector box (0–100), one value per bend. A single number sets the sole jog of a one-bend elbow / curved; an array sets each jog of a multi-bend connector and its length must equal bends. Values outside 0–100 are allowed (they place the bend beyond the endpoint box, as PowerPoint itself does when endpoints flip). When omitted, PowerPoint uses the preset default (50%).
Emitted as <a:gd name="adj1…" fmla="val …"/> adjust guides (OOXML 1000ths-of-a-percent).
altText?
optionalaltText?:string
Defined in: core-interfaces.ts:534
Accessibility alt text
beginArrowType?
optionalbeginArrowType?:"none"|"triangle"|"arrow"|"diamond"|"oval"|"stealth"
Defined in: core-interfaces.ts:528
Arrowhead at the start point
bends?
optionalbends?:2|1|3
Defined in: core-interfaces.ts:475
Number of adjustable bends (jogs) for an elbow / curved connector. Selects the preset variant and how many adj values it accepts:
1→bentConnector3/curvedConnector3(one jog) — the default2→bentConnector4/curvedConnector4(two jogs)3→bentConnector5/curvedConnector5(three jogs)
Ignored for type: 'straight' (a straight connector has no bends).
Default
ts
1color?
optionalcolor?:string
Defined in: core-interfaces.ts:519
Line color (6-digit hex, no #)
Default
ts
'000000'dashType?
optionaldashType?:"dash"|"solid"|"dashDot"|"lgDash"|"lgDashDot"|"lgDashDotDot"|"sysDash"|"sysDot"
Defined in: core-interfaces.ts:526
Dash style
endArrowType?
optionalendArrowType?:"none"|"triangle"|"arrow"|"diamond"|"oval"|"stealth"
Defined in: core-interfaces.ts:530
Arrowhead at the end point
endShape?
optionalendShape?:string
Defined in: core-interfaces.ts:501
Bind the connector's end point to a shape on the same slide (by objectName). Emits <a:endCxn>. See startShape.
endShapeIdx?
optionalendShapeIdx?:number
Defined in: core-interfaces.ts:506
Connection-site index on endShape. Ignored without endShape.
Default
ts
0objectName?
optionalobjectName?:string
Defined in: core-interfaces.ts:532
Selection Pane object name
startShape?
optionalstartShape?:string
Defined in: core-interfaces.ts:493
Bind the connector's start point to a shape on the same slide, referenced by that shape's objectName. Emits <a:stCxn id=… idx=…>, so PowerPoint treats the endpoint as attached: it reroutes when the shape moves and its elbow auto-router can engage. The shape's objectName must be set and unique on the slide. x1/y1 remain the static fallback geometry (and are used if the name can't be resolved).
startShapeIdx?
optionalstartShapeIdx?:number
Defined in: core-interfaces.ts:499
Connection-site index on startShape (0-based; the valid range is preset-dependent — a shape's <a:cxnLst> enumerates its sites). Ignored without startShape.
Default
ts
0type?
optionaltype?:ConnectorType
Defined in: core-interfaces.ts:464
Routing style
Default
ts
'straight'width?
optionalwidth?:number
Defined in: core-interfaces.ts:524
Line width (pt)
Default
ts
1x1
x1:
Coord
Defined in: core-interfaces.ts:508
Start point X — inches, or a Coord such as '50%' / '2in'
x2
x2:
Coord
Defined in: core-interfaces.ts:512
End point X
y1
y1:
Coord
Defined in: core-interfaces.ts:510
Start point Y
y2
y2:
Coord
Defined in: core-interfaces.ts:514
End point Y