Skip to content

Documentation / @ripl/charts / positionSymbol

Function: positionSymbol() ​

positionSymbol(element, cx, cy): void

Defined in: charts/src/components/symbols.ts:69

Repositions a symbol element, keeping a rotated symbol's transform origin locked to its center (a square is a 45°-rotated regular quad, so its origin must follow cx/cy).

Parameters ​

ParameterTypeDescription
elementSymbolElementThe symbol element to move.
cxnumberThe new center x-coordinate.
cynumberThe new center y-coordinate.

Returns ​

void