Field

PropertyDefaultMeaning
vectors[]{ point, vector } samples
scale1Multiplier applied to every vector
normalizefalseNormalize vectors before applying scale
head-sizepx(5)Arrowhead length for built-in arrows
head-width1.3Full arrowhead width divided by its length
head-curve0Barb curvature from 0 to 1, as in Arrow
head-openfalseDraw stroked barbs connected to the shaft tip
head-barb"both"Draw both barbs, or only "left" / "right" relative to each vector
head-style / head-*—Shared ArrowHead shape and paint options, as in Arrow
shape—Replacement Element or (sample, index) => Element callback
shape-heightpx(8)Height allocated to replacement shapes
spaceAutomaticUse ambient data coordinates or local geometry

Draw vectors=[{point,vector},...], with either {x,y} or [x,y] for each point and vector. Each endpoint is point + scale × vector. scale defaults to 1; normalize divides by magnitude before scaling. Zero/nonfinite vectors are omitted. Origins and endpoints both affect limits. Points and vectors require exactly two Cartesian coordinates; named or additional dimensions are rejected. The computed origins and endpoints can then pass through the graph's projection.

Default glyphs are arrows, with head-size px(5), head-width 1.3, and ordinary stroke style. Directions are computed after mapping, so flips and unequal axis scales orient heads correctly. Shafts stop inside their heads using the same stroke/cap clearance as Arrow; head tips remain at the mapped endpoints. With head-open, the shaft reaches the tip and the barbs inherit its stroke.

shape accepts an Element or (sample,index) function. A custom shape's local x axis runs from origin to endpoint: width is the mapped vector length; shape-height defaults to px(8). It receives a cleared data context before rotation. Callbacks execute once at construction and always receive {x,y} records in sample.point and sample.vector, including for tuple inputs.