{
    "mark": {
        "cursor": "grab",
        "type": "rect"
    },
    "data": {
        "url": "https://vega.github.io/vega-lite/data/cars.json"
    },
    "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
    "selection": {
        "mySelection": {
            "clear": false,
            "type": "interval",
            "translate": "[mousedown[!event.shiftKey], mouseup] > mousemove",
            "on": "[mousedown[!event.shiftKey], mouseup] > mousemove"
        }
    },
    "encoding": {
        "color": {
            "value": "gray",
            "condition": {
                "field": "*",
                "aggregate": "count",
                "selection": "mySelection",
                "type": "quantitative"
            }
        },
        "x": {
            "field": "Cylinders",
            "type": "ordinal"
        },
        "y": {
            "field": "Origin",
            "type": "ordinal"
        }
    }
}