chart = {
const deps = vl
.markGeoshape({ filled: false, stroke: "#333", strokeWidth: 0.2 })
.data(vl.topojson(mapData).feature("MGN_AMN_DPTOS"));
const muns = vl
.markGeoshape({ filled: false, stroke: "#ccc", strokeWidth: 0.2 })
.data(vl.topojson(mapData).feature("MGN_AMN_MPIOS"));
const dots = vl
.markPoint({
tooltip: true, filled: false, fillOpacity: 0.8,
fill:"#4f9e39", stroke:"#4f9e39", fillOpacity: 1,
strokeWidth: 0.5})
.encode(
vl.latitude().fieldQ("properties.LATITUD").title("Lat"),
vl.longitude().fieldQ("properties.LONGITUD").title("Long"),
vl.detail().fieldN("properties.MPIO_CNMBR").title("City"),
vl.size()
.fieldQ("properties.STP27_PERS")
.title("Población")
.scale({ type: "linear" })
.legend({
format: ".2s", symbolType: spikePath,
direction: "horizontal", orient: "bottom-right"
}),
vl.shape().datum("spike").scale({domain:["spike"], range: [spikePath]}).legend(false)
)
.data(mapData.objects.MGN_AMN_MPIOS.geometries);
return vl
.layer(muns, deps, dots)
.project(
vl.projection("azimuthalEqualArea").rotate([74 + 30 / 60, -38 - 50 / 60])
)
.width(width * .7)
.height(height)
.render();
}