Skip to content

@putianyi888/vue3-plots


Defined in: geometry.ts:233

Circular sector defined by a center point, outer radius, start angle, and sweep angle.

Angles are in degrees. 0 points right, and positive values rotate clockwise in SVG coordinates.

Extends ​

Constructors ​

Constructor ​

new CircularSector(cx, cy, radius, startAngle, sweep): CircularSector

Defined in: geometry.ts:236

Parameters ​

ParameterTypeDescription
cxnumberCenter x coordinate.
cynumberCenter y coordinate.
radiusnumberOuter radius.
startAnglenumberStart angle in degrees.
sweepnumberSweep angle in degrees.

Returns ​

CircularSector

Overrides ​

Shape.constructor

Properties ​

PropertyModifierTypeDefault valueDescriptionOverridesDefined in
cxreadonlynumberundefinedCenter x coordinate.-geometry.ts:238
cyreadonlynumberundefinedCenter y coordinate.-geometry.ts:240
radiusreadonlynumberundefinedOuter radius.-geometry.ts:242
startAnglereadonlynumberundefinedStart angle in degrees.-geometry.ts:244
sweepreadonlynumberundefinedSweep angle in degrees.-geometry.ts:246
typereadonly"circular-sector"'circular-sector'-Shape.typegeometry.ts:234

Methods ​

contains() ​

contains(point): boolean

Defined in: geometry.ts:257

Checks whether a point is inside or on the sector boundary.

Parameters ​

ParameterTypeDescription
pointPointPoint to test.

Returns ​

boolean

Whether the point is contained by the sector.

Overrides ​

Shape.contains


svgPath() ​

svgPath(): string

Defined in: geometry.ts:266

Generates an SVG path string for the sector.

Returns ​

string

SVG path data.

Overrides ​

Shape.svgPath