{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "data": { "values": "" }, "title": "", "width": 300, "height": 300, "layer": [ { "encoding": { "x": { "field": "", "type": "quantitative", "title": "" }, "y": { "field": "", "type": "quantitative", "title": "", "scale": { "zero": false } }, "color": { "field": "rev", "type": "nominal" } }, "layer": [ { "mark": "point" }, { "selection": { "label": { "type": "single", "nearest": true, "on": "mouseover", "encodings": [ "x" ], "empty": "none", "clear": "mouseout" } }, "mark": "point", "encoding": { "opacity": { "condition": { "selection": "label", "value": 1 }, "value": 0 } } } ] }, { "transform": [ { "filter": { "selection": "label" } } ], "layer": [ { "encoding": { "text": { "type": "quantitative", "field": "" }, "x": { "field": "", "type": "quantitative" }, "y": { "field": "", "type": "quantitative" } }, "layer": [ { "mark": { "type": "text", "align": "left", "dx": 5, "dy": -5 }, "encoding": { "color": { "type": "nominal", "field": "rev" } } } ] } ] } ] }