mark = vl.markGeoshape(
{
stroke: '#aaa',
strokeWidth: 0.25,
}
)
.data(jurisdictions)
.encode(
vl.tooltip([
{type: 'nominal', field: 'name', title: "Name"},
{type: 'quantitative', field: 'shareOfPop', title: "Share of Pop", format: ","},
{type: 'quantitative', field: 'cases', title: 'Cases', format: ","},
{type: 'quantitative', field: 'population', title: 'Population', format: ","},
]),
vl.color()
.fieldQ('shareOfPop')
.scale(
{
scheme: "yelloworangered",
domain: [250, 20],
clamp: true,
}
)
.legend(legendConfig)
)
.project(vl.projection('albersUsa'))
.height(markHeight)
.width(markWidth)
.autosize(
{
type: "fit",
contains: "padding",
resize: true
}
)