-
-
Notifications
You must be signed in to change notification settings - Fork 668
Open
Labels
Description
When creating an image scatterplot with vega-lite Images were positioned incorrectly. See this layered chart where the points don't match the position of the images
After some exploration, the only way I could get the images to position correctly was by adding the height attribute to the mark
Minimal example to reproduce the bug
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"layer": [
{
"mark": {"type": "image" },
"encoding": {
"x": {"field": "title", "type": "nominal"},
"url": {"field": "img", "type": "nominal"},
"y": {"field": "score", "type": "quantitative"},
"tooltip": {"field": "title"}
}
},
{
"mark": {"type": "point"},
"encoding": {
"x": {"field": "title", "type": "nominal"},
"y": {"field": "score", "type": "quantitative"},
"tooltip": {"field": "title"}
}
}
],
"data": {
"values": [
{
"title": "Minecraft",
"score": 4.5664163,
"img": "https://play-lh.googleusercontent.com/yAtZnNL-9Eb5VYSsCaOC7KAsOVIJcY8mpKa0MoF-0HCL6b0OrFcBizURHywpuip-D6Y=w832-h470"
}
]
},
"width": 200
}