{
const brush = vl.selectInterval().encodings("x");
const years = vl
.markBar({ width: 4 })
.data(movies)
.params(brush)
.encode(
vl.x().year("Release_Date").title("Films by Release Year"),
vl.y().count().title(null)
)
.width(600)
.height(50);
const ratings = vl
.markCircle()
.data(movies)
.encode(
vl.x().fieldQ("Rotten_Tomatoes_Rating"),
vl.y().fieldQ("IMDB_Rating"),
vl.tooltip().fieldN("Title"),
vl.opacity().if(brush, vl.value(0.75)).value(0.05)
)
.width(600)
.height(400);
return vl.vconcat(years, ratings).spacing(5).render();
}