map = {
let m = eurostatmap
.map("choropleth")
.height(900)
.width(1100)
.title("Gross domestic product (GDP)")
.titleFontSize(20)
.subtitleFontSize(17)
.subtitle("Euro per inhabitant, 2021")
.nutsLevel("mixed")
.classificationMethod("threshold")
.threshold(thresholds)
.colors(colors)
.legend({
x: width - 350,
y: 20,
title: "Euro per inhabitant",
boxOpacity: 1,
labelType: "ranges",
histogram: legendAsHistogram
? {
showCounts: labelType == "counts",
showPercentages: labelType == "percentages",
orientation: orientation,
labelRotation: orientation == "horizontal" ? 85 : 0
}
: false
});
m.statData().setData(stats);
m.build();
return m;
}