Skip to content

MapChart

Type module

Sources

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

/**
* Import via: MapChart.ts
* Access items like: $mapchart.myVariable
*/
import * as $mapchart from "@amcharts/amcharts5/MapChart";

Variables

homeKeys

Type ArrayDefault [ "zoomLevel", "translateX", "translateY", "rotationX", "rotationY" ]

projectionRegistry

Type object

Projections that MapChart's projectionName can name. am5map registers its bundled projections here; add others with registerProjection().

Functions

registerProjection(name: string,
factory: () => GeoProjection
)

Returns () => GeoProjection

Registers a projection factory under name, for MapChart's projectionName.

Returns the factory tagged with the name: a chart given projection: cc(), where const cc = registerProjection("geoConicConformal", geoConicConformal), serializes with its projectionName, as the bundled projections do.

tagProjection(name: string,
factory: () => GeoProjection
)

Returns () => GeoProjection

Wraps a projection factory so the projections it makes carry name, which lets ChartSerializer write projectionName for a chart that sets projection in code.