考虑以下人为设计的示例:
{
"data": {"url": "data/cars.json"},
"mark": "point",
"encoding": {
"x": {"field": "Horsepower","type": "quantitative"},
"y": {"field": "Origin","type": "nominal"},
"color": {"field": "Miles_per_Gallon","type": "ordinal"}
}
}
数据集有许多值,Miles_per_Gallon
因此color
图例将包含许多元素,并且比绘图本身大得多。
有没有办法在多列而不是一个列中显示这个图例?