By using the mark type group
we can facet the data and create small multiples, as this:
"marks": [
{
"name": "rankName2",
"type": "group",
"from": {
"facet": {
"data": "region_only",
"name": "rankNames",
"groupby": "rankName"
}
},
...
```
However, as two diferent marks are displayed (rects and lines, based on another field different from the one used by the facet), I didn't found in the specs a way inject some data transformation again to have diferent facets again, one for each type of visual mark. So the mark group is used twice, one to display each type of mark. Far far being ideal.
https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.0-rc4/vega.js
https://cdnjs.cloudflare.com/ajax/libs/vega-lite/2.0.0-beta.10/vega-lite.js
https://cdnjs.cloudflare.com/ajax/libs/vega-embed/3.0.0-beta.19/vega-embed.js