{ "data": { "url": "https://vega.github.io/vega-lite/data/seattle-weather.csv" }, "vconcat": [ { "transform": [ { "filter": { "selection": "myClick" } } ], "height": 300, "mark": "point", "width": 600, "selection": { "myBrush": { "encodings": [ "x" ], "type": "interval" } }, "encoding": { "color": { "value": "#cfdebe", "condition": { "field": "weather", "scale": { "domain": [ "sun", "fog", "drizzle", "rain", "snow" ], "range": [ "#e7ba52", "#c7c7c7", "#aec7ea", "#1f77b4", "#9467bd" ] }, "selection": "myBrush", "title": "Weather", "type": "nominal" } }, "size": { "field": "precipitation", "scale": { "domain": [ -1, 50 ] }, "type": "quantitative" }, "x": { "field": "date", "timeUnit": "monthdate", "type": "temporal", "axis": { "format": "%b", "title": "Date" } }, "y": { "field": "temp_max", "scale": { "domain": [ -5, 40 ] }, "type": "quantitative", "axis": { "title": "Maximum Daily Temperature (C)" } } } }, { "transform": [ { "filter": { "selection": "myBrush" } } ], "mark": "bar", "width": 600, "selection": { "myClick": { "encodings": [ "color" ], "type": "multi" } }, "encoding": { "color": { "value": "#acbf98", "condition": { "field": "weather", "scale": { "domain": [ "sun", "fog", "drizzle", "rain", "snow" ], "range": [ "#e7ba52", "#c7c7c7", "#aec7ea", "#1f77b4", "#9467bd" ] }, "selection": "myClick", "type": "nominal" } }, "x": { "aggregate": "count", "type": "quantitative" }, "y": { "field": "weather", "type": "nominal" } } } ], "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "title": "Seattle Weather, 2012-2015", "description": "A dashboard with cross-highlighting" }