{ "transform": [ { "window": [ { "op": "count", "as": "index" } ] }, { "fold": [ "petalLength", "petalWidth", "sepalLength", "sepalWidth" ] }, { "groupby": [ "key" ], "joinaggregate": [ { "op": "min", "as": "min", "field": "value" }, { "op": "max", "as": "max", "field": "value" } ] }, { "as": "normVal", "calculate": "(datum.value - datum.min) / (datum.max-datum.min)" }, { "as": "mid", "calculate": "(datum.min + datum.max) / 2" } ], "height": 300, "config": { "style": { "tick": { "orient": "horizontal", "tooltip": null }, "label": { "dx": -5, "tooltip": null, "align": "right", "baseline": "middle" } }, "view": { "stroke": null }, "axisX": { "labelAngle": 0, "domain": false, "tickColor": "#ccc" } }, "data": { "url": "https://vega.github.io/vega-lite/data/iris.json" }, "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "layer": [ { "mark": { "opacity": 0.3, "type": "line" }, "encoding": { "color": { "field": "species", "type": "nominal" }, "tooltip": [ { "field": "petalLength", "type": "quantitative" }, { "field": "petalWidth", "type": "quantitative" }, { "field": "sepalLength", "type": "quantitative" }, { "field": "sepalWidth", "type": "quantitative" } ], "x": { "field": "key", "type": "nominal" }, "detail": { "field": "index", "type": "nominal" }, "y": { "field": "normVal", "type": "quantitative", "axis": null } } }, { "mark": { "color": "#ccc", "type": "rule" }, "encoding": { "x": { "field": "key", "type": "nominal", "axis": { "title": null } }, "detail": { "aggregate": "count", "type": "quantitative" } } }, { "mark": { "style": "label", "type": "text" }, "encoding": { "text": { "field": "max", "aggregate": "max", "type": "quantitative" }, "x": { "field": "key", "type": "nominal" }, "y": { "value": 0 } } }, { "mark": { "style": "label", "type": "text" }, "encoding": { "text": { "field": "mid", "aggregate": "min", "type": "quantitative" }, "x": { "field": "key", "type": "nominal" }, "y": { "value": 150 } } }, { "mark": { "style": "label", "type": "text" }, "encoding": { "text": { "field": "min", "aggregate": "min", "type": "quantitative" }, "x": { "field": "key", "type": "nominal" }, "y": { "value": "height" } } } ], "description": "Parallel coordinates plot with manual generation of parallel axes" }