vl.markBar()
.data(
df_characters
.groupby("character")
.count()
.orderby(aq.desc("count"))
.filter(aq.escape(d => d.count >= range))
)
.encode(
vl.y().field('character')
.type('nominal')
.sort("count")
.title("Characters of Tintin"),
vl.x().field('count')
.type('quantitative')
.title("Number of appearances"),
vl.tooltip(['character', 'count'])
)
.width(width)
.render()