{
const brush = vl.selectInterval().encodings('x').resolve('intersect'),
hist = vl.markBar().encode(
vl.x().fieldQ(vl.repeat('row')).bin({maxbins: 20}),
vl.y().count().title(null)
);
return vl.layer(
hist.select(brush).encode(vl.color().value('lightgrey')),
hist.transform(vl.filter(brush))
)
.width(500).height(100)
.repeat({row: ['GDP per capita', 'Social support','Generosity']})
.data(happiness)
.config({view: {stroke: null}})
.render();
}