polarToCartesian
Chart
stable
Convert a polar coordinate (centre, radius, angle in radians) into a Cartesian `[x, y]` point. Uses the mathematical convention — zero at 3 o'clock, counter-clockwise — shifted to noon/clockwise for visual consistency with radar and pie charts.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- cxrequisnumber
- X coordinate of the circle centre in SVG user units.
- cyrequisnumber
- Y coordinate of the circle centre in SVG user units.
- radiusrequisnumber
- Distance from the centre to the point.
- anglerequisnumber
- Angle in radians using the mathematical convention (0 = 3 o'clock, counter-clockwise). Internally shifted by `-π/2` so that 0 = noon, clockwise, matching `arcPath`.
API
Valeur de retour
La valeur retournée par cet util.
- A `[x, y]` tuple in SVG user units representing the Cartesian equivalent of the given polar coordinate.
Usage
Exemples
Extraits de code prêts à coller.
Position a label at the top of a circle