Path

Type module

Sources

Items from Path can be imported/included and used via following ways.

/**
 * --------------------------------------------------------
 * Import via main package: core.ts
 * Access items like: am4core.path.myVariable
 *                    am4core.path.myFunction()
 * --------------------------------------------------------
 */
import * as am4core from "@amcharts/amcharts4";

/**
 * --------------------------------------------------------
 * Import via: Path.ts
 * Access items like: $path.myVariable
 *                    $path.myFunction()
 * --------------------------------------------------------
 */
import * as $path from "@amcharts/amcharts4/Path";

/**
 * --------------------------------------------------------
 * Include via "core.js"
 * Access items like: am4core.path.myVariable
 *                    am4core.path.myFunction()
 * --------------------------------------------------------
 */

Variables

Path does not have any variables.

Functions

pathToPoints(

path: string,
pointCount: number

)

#

Returns void

Converts SVG path to array of points.

Note, this is experimental feature based on method which is deprecated on some browsers and some browsers do not support it at all.

You can save the output of this function, but not rely on it completely.

pointsToPath(

points: IPoint[]

)

#

Returns string

spiralPoints(

cx: number,
cy: number,
radius: number,
radiusY: number,
innerRadius: number,
step: number,
radiusStep: number,
startAngle?: number,
endAngle?: number

)

#

Returns void