arcPath
Chart
stable
Build an SVG path string for a pie or donut slice. Angles are in radians using the standard math convention (0 at 3 o'clock, counter-clockwise); the helper converts internally to the SVG convention.
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 chart center.
- cyrequisnumber
- Y coordinate of the chart center.
- outerRrequisnumber
- Outer radius of the arc (pie radius).
- innerRrequisnumber
- Inner radius. Pass 0 for a solid pie slice, or a positive value for a donut hole.
- startAnglerequisnumber
- Start angle in radians (math convention, 0 = 3 o'clock, CCW).
- endAnglerequisnumber
- End angle in radians (math convention). Returns an empty string when the sweep is zero.
API
Valeur de retour
La valeur retournée par cet util.
- SVG path data string. Returns an empty string when the angular sweep is effectively zero.
Usage
Exemples
Extraits de code prêts à coller.
Full-circle donut slice