{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": {"name": "dataset"}, "transform": [ {"window": [{"op": "rank", "as": "rank"}], "sort": [{"field": "Value", "order": "descending"}]}, {"filter": "datum.rank <= 10"} ], "facet": { "row": { "field": "Category", "type": "nominal", "sort": {"field": "Value", "order": "descending"}, "header": { "labelAngle": 0, "title": "", "labelAlign": "left", "labelPadding": 5 } } }, "spec": { "layer": [ { "mark": {"type": "bar", "color": "#d4dae0", "size": 10, "opacity": 1}, "encoding": {"x": {"field": "Value", "type": "quantitative"}} }, { "mark": {"type": "tick", "color": "black", "size": 25}, "encoding": {"x": {"field": "Target", "type": "quantitative"}} }, { "mark": {"type": "text", "align": "right", "dx": -5}, "encoding": { "x": {"value": -15}, "text": {"field": "Value", "type": "quantitative", "format": ",.0f"}, "color": {"value": "#5d5d5d"} } }, { "mark": {"type": "text", "align": "center", "dy": -20}, "encoding": { "x": {"field": "Target", "type": "quantitative"}, "text": {"field": "Target", "type": "quantitative", "format": ",.0f"}, "color": {"value": "#5d5d5d"}, "size": {"value": 9} } } ] } }