您可以通过组合一系列序列来做到这一点展平变换 https://vega.github.io/vega-lite/docs/flatten.html and 计算变换 https://vega.github.io/vega-lite/docs/calculate.html。例如 (在编辑器中查看 https://vega.github.io/editor/#/url/vega-lite/N4IgJghgLhIFygG4QDYFcCmBnepI3gG1CBGAGhIAYBdMwgZjIDZbCBWMmugTjIBZWJcgCZq1AL7iyIKACcIAOywAzAPayAtkVDKU0KBgVFw0WBLKgAxqkto9B+CahoNAOnwRCNENIg44MgCWGhggUlY2dtChAfgu7qak1D4gfo7I6KHitCAaELIA1o4ogQqh0oaWqmClAOa4IAAeDcqBGChgjlDB5TIAngAOMSAAjmiK3TDdiFnSfS1tHemomClQg8NjE4FTgTNhkkA):
{
"data": {"values": {"data": [[1, 10], [3, 6], [5, 0], [9, 4], [11, 2]]}},
"transform": [
{"flatten": ["data"]},
{"calculate": "datum.data[0]", "as": "time"},
{"calculate": "datum.data[1]", "as": "value"}
],
"mark": "line",
"encoding": {
"x": {"field": "time", "type": "quantitative"},
"y": {"field": "value", "type": "quantitative"}
}
}