eurostatmap
.map("pie")
.width(1000)
.nutsLvl(2)
.geoCenter([4500000, 3300000])
.statPie(
{
eurostatDatasetCode: "EF_M_FARMLEG",
filters: {
so_eur: "TOTAL",
crops: "UAA",
farmtype: "TOTAL",
leg_form: "TOTAL",
uaarea: "TOTAL",
unit: "HA",
time: 2020
},
unitText: ""
},
"so_eur",
["KE_GT0_LT2", "KE250-499", "KE_GE500"],
["< €2 000", "€250 000 - €499 999", ">= €500 000 "],
["#7fc97f", "#386cb0", "#f0027f"],
"TOTAL"
)
.pieOtherColor("#fdc086")
.pieOtherText("< €500 000")
.pieMinRadius(3)
.pieMaxRadius(40)
.insets("default")
.title("Annual farm output in euro by NUTS 2 regions")
.subtitle(
"Pie size represents total output and segment colors correspond with output ranges"
)
.subtitleFontSize(14)
.legend({
x: 0,
y: 160,
boxOpacity: 0,
boxFill: "white",
titleFontWeight: "bold",
sizeLegend: {
title: "Total output in euros",
values: [100000, 10000000]
},
colorLegend: {
title: "Standard output in euros (SO_EUR)"
}
})
.build()