Convert an am5map MapPolygonSeries into ChoroplethPoint data.
A region amCharts drew but joined no value onto is left out. It is the
ordinary case on a real map — the shapes with no data, drawn in a flat
colour — and a layer's value is a number, so there is nothing to announce
for one.
The centroids are what make this a map rather than a bar chart whose
categories happen to be places. They are read in degrees or not at all:
from the author's own row first, where a table of { region, value, lon, lat }
states them outright, and from the drawn polygon's geoCentroid() second.
A pair that resolves to neither is omitted — ChoroplethTrace then keeps
the regions in declared order in one band, which is a poorer reading but the
one the data supports.
neighbors is not emitted at all. Adjacency is not recoverable from
rendered geometry, and not from centroids either, so the trace keeps its
spatial walk and is told nothing about borders rather than something
guessed — the same call the Highcharts adapter makes.
Convert an am5map
MapPolygonSeriesinto ChoroplethPoint data.A region amCharts drew but joined no value onto is left out. It is the ordinary case on a real map — the shapes with no data, drawn in a flat colour — and a layer's value is a number, so there is nothing to announce for one.
The centroids are what make this a map rather than a bar chart whose categories happen to be places. They are read in degrees or not at all: from the author's own row first, where a table of
{ region, value, lon, lat }states them outright, and from the drawn polygon'sgeoCentroid()second. A pair that resolves to neither is omitted —ChoroplethTracethen keeps the regions in declared order in one band, which is a poorer reading but the one the data supports.neighborsis not emitted at all. Adjacency is not recoverable from rendered geometry, and not from centroids either, so the trace keeps its spatial walk and is told nothing about borders rather than something guessed — the same call the Highcharts adapter makes.