periodicTable = _.memoize(brush => {
const x = vl
.x()
.fieldN("Group")
.axis(false);
const y = vl
.y()
.fieldN("Period")
.axis(false);
const squares = vl
.markRect({ stroke: "white" })
.width(550)
.height(250)
.select(brush)
.encode(x, y, colorEncoding(brush), opacityEncoding(brush));
const text = vl.markText().encode(x, y, vl.text().field("Symbol"));
return vl.layer(squares, text);
})