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)
.legend({
x: orientation == "horizontal" ? width - 360 : width - 320,
y: orientation == "horizontal" ? 20 : 120,
title: "Euro per inhabitant",
boxOpacity: 1,
labelType: "ranges",
histogram: legendAsHistogram
? {
showCounts: labelType == "counts",
width: orientation == "horizontal" ? 250 : 200,
showPercentages: labelType == "percentages",
orientation: orientation,
labelRotation: orientation == "horizontal" ? 85 : 0
}
: false
});
m.statData().setData(stats);
m.build();
return m;
}