swiftmap.legend("#legend")
.left() // defaults to 0
.right() // defaults to 0
.top() // defaults to 0
.bottom() // defaults to 0
.width() // defaults to parent width
.height() // defaults to parent height
.keyThresholdHorizontal(scheme) // scheme must be sequential or categorical
.keyRectVertical(scheme) // scheme must be sequential or categorical
.keyCircleHorizontal(scheme) // scheme must be sequential or categorical
.keyBubble(scheme) // scheme must be bubble
.keyDistance(map); // need the map
window.onresize = () => legend.resize();
Something like: