diff --git a/examples/specs/airport_connections.vl.json b/examples/specs/airport_connections.vl.json index 12297420e0..32ccb4ec23 100644 --- a/examples/specs/airport_connections.vl.json +++ b/examples/specs/airport_connections.vl.json @@ -11,105 +11,50 @@ }, "data": { "url": "data/us-10m.json", - "format": { - "type": "topojson", - "feature": "states" - } + "format": {"type": "topojson", "feature": "states"} } }, { - "mark": { - "type": "rule", - "color": "#000", - "opacity": 0.35 - }, - "data": { - "url": "data/flights-airport.csv" - }, + "mark": {"type": "rule", "color": "#000", "opacity": 0.35}, + "data": {"url": "data/flights-airport.csv"}, "transform": [ - { - "filter": { - "param": "org", - "empty": false - } - }, + {"filter": {"param": "org", "empty": false}}, { "lookup": "origin", "from": { - "data": { - "url": "data/airports.csv" - }, + "data": {"url": "data/airports.csv"}, "key": "iata", - "fields": [ - "latitude", - "longitude" - ] + "fields": ["latitude", "longitude"] } }, { "lookup": "destination", "from": { - "data": { - "url": "data/airports.csv" - }, + "data": {"url": "data/airports.csv"}, "key": "iata", - "fields": [ - "latitude", - "longitude" - ] + "fields": ["latitude", "longitude"] }, - "as": [ - "lat2", - "lon2" - ] + "as": ["lat2", "lon2"] } ], "encoding": { - "latitude": { - "field": "latitude" - }, - "longitude": { - "field": "longitude" - }, - "latitude2": { - "field": "lat2" - }, - "longitude2": { - "field": "lon2" - } + "latitude": {"field": "latitude"}, + "longitude": {"field": "longitude"}, + "latitude2": {"field": "lat2"}, + "longitude2": {"field": "lon2"} } }, { - "mark": { - "type": "circle" - }, - "data": { - "url": "data/flights-airport.csv" - }, + "mark": {"type": "circle"}, + "data": {"url": "data/flights-airport.csv"}, "transform": [ - { - "aggregate": [ - { - "op": "count", - "as": "routes" - } - ], - "groupby": [ - "origin" - ] - }, + {"aggregate": [{"op": "count", "as": "routes"}], "groupby": ["origin"]}, { "lookup": "origin", "from": { - "data": { - "url": "data/airports.csv" - }, + "data": {"url": "data/airports.csv"}, "key": "iata", - "fields": [ - "state", - "latitude", - "longitude" - ] + "fields": ["state", "latitude", "longitude"] } }, {"filter": "datum.state !== 'PR' && datum.state !== 'VI'"} @@ -122,33 +67,14 @@ "nearest": true, "fields": ["origin"] } - ], - "params": [ - { - "name": "org", - "select": { - "type": "point", - "on": "pointerover", - "nearest": true, - "fields": [ - "origin" - ] - } - } - ], + }], "encoding": { - "latitude": { - "field": "latitude" - }, - "longitude": { - "field": "longitude" - }, + "latitude": {"field": "latitude"}, + "longitude": {"field": "longitude"}, "size": { "field": "routes", "type": "quantitative", - "scale": { - "rangeMax": 1000 - }, + "scale": {"rangeMax": 1000}, "legend": null }, "order": { @@ -158,9 +84,7 @@ } } ], - "projection": { - "type": "albersUsa" - }, + "projection": {"type": "albersUsa"}, "width": 900, "height": 500 } diff --git a/examples/specs/concat_hover_filter.vl.json b/examples/specs/concat_hover_filter.vl.json index 4b17da25b7..d88b2ab328 100644 --- a/examples/specs/concat_hover_filter.vl.json +++ b/examples/specs/concat_hover_filter.vl.json @@ -15,34 +15,17 @@ }], "mark": "point" }, - "layer": [ - { - "params": [ - { - "name": "hover", - "select": { - "type": "point", - "on": "pointerover" - } - } - ], - "mark": "point" - }, - { - "mark": { - "type": "point", - "color": "goldenrod" - }, - "transform": [ - { - "filter": { - "param": "hover", - "empty": false - } - } - ] - } - ] + { + "mark": {"type": "point", "color": "goldenrod"}, + "transform": [ + {"filter": {"param": "hover", "empty": false}} + ] + } + ] + }, { + "encoding": { + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Acceleration", "type": "quantitative"} }, "layer": [ { @@ -53,34 +36,12 @@ }], "mark": "point" }, - "layer": [ - { - "params": [ - { - "name": "hover", - "select": { - "type": "point", - "on": "pointerover" - } - } - ], - "mark": "point" - }, - { - "mark": { - "type": "point", - "color": "goldenrod" - }, - "transform": [ - { - "filter": { - "param": "hover", - "empty": false - } - } - ] - } - ] - } - ] + { + "mark": {"type": "point", "color": "goldenrod"}, + "transform": [ + {"filter": {"param": "hover", "empty": false}} + ] + } + ] + }] } diff --git a/examples/specs/interactive_global_development.vl.json b/examples/specs/interactive_global_development.vl.json index c8e7af7ff0..9a9243ccde 100644 --- a/examples/specs/interactive_global_development.vl.json +++ b/examples/specs/interactive_global_development.vl.json @@ -1,25 +1,14 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "An interactive scatter plot of global health statistics by country and year.", - "data": { - "url": "data/gapminder.json" - }, + "data": {"url": "data/gapminder.json"}, "width": 800, "height": 500, "layer": [ { "transform": [ - { - "filter": { - "field": "country", - "equal": "Afghanistan" - } - }, - { - "filter": { - "param": "year" - } - } + {"filter": {"field": "country", "equal": "Afghanistan"}}, + {"filter": {"param": "year"}} ], "mark": { "type": "text", @@ -28,11 +17,7 @@ "y": 250, "opacity": 0.06 }, - "encoding": { - "text": { - "field": "year" - } - } + "encoding": {"text": {"field": "year"}} }, { "transform": [ @@ -40,35 +25,15 @@ "lookup": "cluster", "from": { "key": "id", - "fields": [ - "name" - ], + "fields": ["name"], "data": { "values": [ - { - "id": 0, - "name": "South Asia" - }, - { - "id": 1, - "name": "Europe & Central Asia" - }, - { - "id": 2, - "name": "Sub-Saharan Africa" - }, - { - "id": 3, - "name": "America" - }, - { - "id": 4, - "name": "East Asia & Pacific" - }, - { - "id": 5, - "name": "Middle East & North Africa" - } + {"id": 0, "name": "South Asia"}, + {"id": 1, "name": "Europe & Central Asia"}, + {"id": 2, "name": "Sub-Saharan Africa"}, + {"id": 3, "name": "America"}, + {"id": 4, "name": "East Asia & Pacific"}, + {"id": 5, "name": "Middle East & North Africa"} ] } } @@ -78,30 +43,14 @@ "x": { "field": "fertility", "type": "quantitative", - "scale": { - "domain": [ - 0, - 9 - ] - }, - "axis": { - "tickCount": 5, - "title": "Fertility" - } + "scale": {"domain": [0, 9]}, + "axis": {"tickCount": 5, "title": "Fertility"} }, "y": { "field": "life_expect", "type": "quantitative", - "scale": { - "domain": [ - 20, - 85 - ] - }, - "axis": { - "tickCount": 5, - "title": "Life Expectancy" - } + "scale": {"domain": [20, 85]}, + "axis": {"tickCount": 5, "title": "Life Expectancy"} } }, "layer": [ @@ -113,26 +62,14 @@ "strokeCap": "round" }, "encoding": { - "detail": { - "field": "country" - }, - "order": { - "field": "year" - }, + "detail": {"field": "country"}, + "order": {"field": "year"}, "opacity": { "condition": { - "test": { - "or": [ - { - "param": "hovered", - "empty": false - }, - { - "param": "clicked", - "empty": false - } - ] - }, + "test": {"or": [ + {"param": "hovered", "empty": false}, + {"param": "clicked", "empty": false} + ]}, "value": 0.8 }, "value": 0 @@ -143,85 +80,45 @@ "params": [ { "name": "year", - "value": [ - { - "year": 1955 - } - ], + "value": [{"year": 1955}], "select": { "type": "point", - "fields": [ - "year" - ] + "fields": ["year"] }, "bind": { "name": "Year", "input": "range", - "min": 1955, - "max": 2005, - "step": 5 + "min": 1955, "max": 2005, "step": 5 } }, { "name": "hovered", "select": { "type": "point", - "fields": [ - "country" - ], + "fields": ["country"], "toggle": false, "on": "pointerover" } }, { "name": "clicked", - "select": { - "type": "point", - "fields": [ - "country" - ] - } - } - ], - "transform": [ - { - "filter": { - "param": "year" - } + "select": {"type": "point", "fields": ["country"]} } ], - "mark": { - "type": "circle", - "size": 100, - "opacity": 0.9 - }, - "encoding": { - "color": { - "field": "name", - "title": "Region" - } - } + "transform": [{"filter": {"param": "year"}}], + "mark": {"type": "circle", "size": 100, "opacity": 0.9}, + "encoding": {"color": {"field": "name", "title": "Region"}} }, { "transform": [ { "filter": { "and": [ - { - "param": "year" - }, - { - "or": [ - { - "param": "clicked", - "empty": false - }, - { - "param": "hovered", - "empty": false - } - ] - } + {"param": "year"}, + {"or": [ + {"param": "clicked", "empty": false}, + {"param": "hovered", "empty": false} + ]} ] } } @@ -233,30 +130,14 @@ "fontWeight": "bold" }, "encoding": { - "text": { - "field": "country" - }, - "color": { - "field": "name", - "title": "Region" - } + "text": {"field": "country"}, + "color": {"field": "name", "title": "Region"} } }, { "transform": [ - { - "filter": { - "param": "hovered", - "empty": false - } - }, - { - "filter": { - "not": { - "param": "year" - } - } - } + {"filter": {"param": "hovered", "empty": false}}, + {"filter": {"not": {"param": "year"}}} ], "layer": [ { @@ -266,18 +147,9 @@ "fontSize": 12, "color": "gray" }, - "encoding": { - "text": { - "field": "year" - } - } + "encoding": {"text": {"field": "year"}} }, - { - "mark": { - "type": "circle", - "color": "gray" - } - } + {"mark": {"type": "circle", "color": "gray"}} ] } ] diff --git a/examples/specs/interactive_index_chart.vl.json b/examples/specs/interactive_index_chart.vl.json index 2ad363031f..db9f872a26 100644 --- a/examples/specs/interactive_index_chart.vl.json +++ b/examples/specs/interactive_index_chart.vl.json @@ -2,11 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": { "url": "data/stocks.csv", - "format": { - "parse": { - "date": "date" - } - } + "format": {"parse": {"date": "date"}} }, "width": 650, "height": 300, @@ -21,27 +17,18 @@ "on": "pointerover", "nearest": true } - ], + }], "mark": "point", "encoding": { - "x": { - "field": "date", - "type": "temporal", - "axis": null - }, - "opacity": { - "value": 0 - } + "x": {"field": "date", "type": "temporal", "axis": null}, + "opacity": {"value": 0} } }, { "transform": [ { "lookup": "symbol", - "from": { - "param": "index", - "key": "symbol" - } + "from": {"param": "index", "key": "symbol"} }, { "calculate": "datum.index && datum.index.price > 0 ? (datum.price - datum.index.price)/datum.index.price : 0", @@ -50,63 +37,27 @@ ], "mark": "line", "encoding": { - "x": { - "field": "date", - "type": "temporal", - "axis": null - }, + "x": {"field": "date", "type": "temporal", "axis": null}, "y": { - "field": "indexed_price", - "type": "quantitative", - "axis": { - "format": "%" - } + "field": "indexed_price", "type": "quantitative", + "axis": {"format": "%"} }, - "color": { - "field": "symbol", - "type": "nominal" - } + "color": {"field": "symbol", "type": "nominal"} } }, { - "transform": [ - { - "filter": { - "param": "index" - } - } - ], + "transform": [{"filter": {"param": "index"}}], "encoding": { - "x": { - "field": "date", - "type": "temporal", - "axis": null - }, - "color": { - "value": "firebrick" - } + "x": {"field": "date", "type": "temporal", "axis": null}, + "color": {"value": "firebrick"} }, "layer": [ + {"mark": {"type": "rule", "strokeWidth": 0.5}}, { - "mark": { - "type": "rule", - "strokeWidth": 0.5 - } - }, - { - "mark": { - "type": "text", - "align": "center", - "fontWeight": 100 - }, + "mark": {"type": "text", "align": "center", "fontWeight": 100}, "encoding": { - "text": { - "field": "date", - "timeUnit": "yearmonth" - }, - "y": { - "value": 310 - } + "text": {"field": "date", "timeUnit": "yearmonth"}, + "y": {"value": 310} } } ] diff --git a/examples/specs/interactive_line_point_hover.vl.json b/examples/specs/interactive_line_point_hover.vl.json index e3fdcc7a61..ef00f44197 100644 --- a/examples/specs/interactive_line_point_hover.vl.json +++ b/examples/specs/interactive_line_point_hover.vl.json @@ -1,8 +1,11 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "Stock prices of 5 Tech Companies over Time, with a point marker on hover. Note that the hidden markers are intentionally bigger to make it easier for readers to hover.", - "data": { - "url": "data/stocks.csv" + "data": {"url": "data/stocks.csv"}, + "encoding": { + "x": {"field": "date", "type": "temporal"}, + "y": {"field": "price", "type": "quantitative"}, + "color": {"field": "symbol", "type": "nominal"} }, "layer": [{ "mark": "line" diff --git a/examples/specs/interactive_multi_line_pivot_tooltip.vl.json b/examples/specs/interactive_multi_line_pivot_tooltip.vl.json index 0ca9ba8159..32fd991b85 100644 --- a/examples/specs/interactive_multi_line_pivot_tooltip.vl.json +++ b/examples/specs/interactive_multi_line_pivot_tooltip.vl.json @@ -1,86 +1,34 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "data": { - "url": "data/stocks.csv" - }, + "data": {"url": "data/stocks.csv"}, "width": 400, "height": 300, - "encoding": { - "x": { - "field": "date", - "type": "temporal" - } - }, + "encoding": {"x": {"field": "date", "type": "temporal"}}, "layer": [ { "encoding": { - "color": { - "field": "symbol", - "type": "nominal" - }, - "y": { - "field": "price", - "type": "quantitative" - } + "color": {"field": "symbol", "type": "nominal"}, + "y": {"field": "price", "type": "quantitative"} }, "layer": [ - { - "mark": "line" - }, - { - "transform": [ - { - "filter": { - "param": "hover", - "empty": false - } - } - ], - "mark": "point" - } + {"mark": "line"}, + {"transform": [{"filter": {"param": "hover", "empty": false}}], "mark": "point"} ] }, { - "transform": [ - { - "pivot": "symbol", - "value": "price", - "groupby": [ - "date" - ] - } - ], + "transform": [{"pivot": "symbol", "value": "price", "groupby": ["date"]}], "mark": "rule", "encoding": { "opacity": { - "condition": { - "value": 0.3, - "param": "hover", - "empty": false - }, + "condition": {"value": 0.3, "param": "hover", "empty": false}, "value": 0 }, "tooltip": [ - { - "field": "AAPL", - "type": "quantitative" - }, - { - "field": "AMZN", - "type": "quantitative" - }, - { - "field": "GOOG", - "type": "quantitative" - }, - { - "field": "IBM", - "type": "quantitative" - }, - { - "field": "MSFT", - "type": "quantitative" - } + {"field": "AAPL", "type": "quantitative"}, + {"field": "AMZN", "type": "quantitative"}, + {"field": "GOOG", "type": "quantitative"}, + {"field": "IBM", "type": "quantitative"}, + {"field": "MSFT", "type": "quantitative"} ] }, "params": [{ @@ -92,7 +40,7 @@ "on": "pointerover", "clear": "pointerout" } - ] + }] } ] } diff --git a/examples/specs/interactive_paintbrush.vl.json b/examples/specs/interactive_paintbrush.vl.json index dc0108c25f..4971a67a0b 100644 --- a/examples/specs/interactive_paintbrush.vl.json +++ b/examples/specs/interactive_paintbrush.vl.json @@ -8,19 +8,10 @@ }], "mark": "point", "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Miles_per_Gallon", - "type": "quantitative" - }, + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "size": { - "condition": { - "param": "paintbrush", - "value": 300 - }, + "condition": {"param": "paintbrush", "value": 300}, "value": 50 } } diff --git a/examples/specs/interactive_paintbrush_color_nearest.vl.json b/examples/specs/interactive_paintbrush_color_nearest.vl.json index b9ee1f84d0..0b2818c4f5 100644 --- a/examples/specs/interactive_paintbrush_color_nearest.vl.json +++ b/examples/specs/interactive_paintbrush_color_nearest.vl.json @@ -9,27 +9,18 @@ "on": "pointerover", "nearest": true } - ], + }], "mark": "circle", "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Miles_per_Gallon", - "type": "quantitative" - }, + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "color": { "condition": { "param": "paintbrush", - "field": "Cylinders", - "type": "ordinal" + "field": "Cylinders", "type": "ordinal" }, "value": "grey" }, - "size": { - "value": 75 - } + "size": {"value": 75} } } diff --git a/examples/specs/interactive_paintbrush_simple_true.vl.json b/examples/specs/interactive_paintbrush_simple_true.vl.json index bfbcfdcb72..c84add42ae 100644 --- a/examples/specs/interactive_paintbrush_simple_true.vl.json +++ b/examples/specs/interactive_paintbrush_simple_true.vl.json @@ -1,14 +1,10 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "data": { - "url": "data/cars.json" - }, + "data": {"url": "data/cars.json"}, "params": [ { "name": "toggleOrigin", - "bind": { - "input": "checkbox" - } + "bind": {"input": "checkbox"} }, { "name": "paintbrush", @@ -17,14 +13,8 @@ ], "mark": "point", "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Miles_per_Gallon", - "type": "quantitative" - }, + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "color": { "condition": { "param": "toggleOrigin", diff --git a/examples/specs/interactive_stocks_nearest_index.vl.json b/examples/specs/interactive_stocks_nearest_index.vl.json index 7f341ce564..e3143105b1 100644 --- a/examples/specs/interactive_stocks_nearest_index.vl.json +++ b/examples/specs/interactive_stocks_nearest_index.vl.json @@ -2,27 +2,16 @@ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "width": 600, "height": 300, - "data": { - "url": "data/stocks.csv" - }, + "data": {"url": "data/stocks.csv"}, "encoding": { - "x": { - "field": "date", - "type": "temporal" - } + "x": {"field": "date", "type": "temporal"} }, "layer": [ { "mark": "line", "encoding": { - "y": { - "field": "price", - "type": "quantitative" - }, - "color": { - "field": "symbol", - "type": "nominal" - } + "y": {"field": "price", "type": "quantitative"}, + "color": {"field": "symbol", "type": "nominal"} } }, { @@ -34,65 +23,33 @@ "on": "pointermove", "nearest": true } - ], - "mark": { - "type": "point" - }, + }], + "mark": {"type": "point"}, "encoding": { - "y": { - "field": "price", - "type": "quantitative" - }, - "opacity": { - "value": 0 - } + "y": {"field": "price", "type": "quantitative"}, + "opacity": {"value": 0} } }, { "transform": [ - { - "filter": { - "and": [ - "index.date", - { - "param": "index" - } - ] - } - } + {"filter": { + "and": ["index.date", {"param": "index"}] + }} ], "mark": "rule" }, { "transform": [ - { - "filter": { - "and": [ - "index.date", - { - "param": "index" - } - ] - } - } + {"filter": { + "and": ["index.date", {"param": "index"}] + }} ], "mark": "text", "encoding": { - "y": { - "value": 10 - }, - "text": { - "field": "date", - "type": "temporal" - } + "y": {"value": 10}, + "text": {"field": "date", "type": "temporal"} } } ], - "config": { - "text": { - "align": "right", - "dx": -5, - "dy": 5 - } - } + "config": {"text": {"align": "right", "dx": -5, "dy": 5}} } diff --git a/examples/specs/normalized/concat_hover_filter_normalized.vl.json b/examples/specs/normalized/concat_hover_filter_normalized.vl.json index 6c104722f6..94ebea2af3 100644 --- a/examples/specs/normalized/concat_hover_filter_normalized.vl.json +++ b/examples/specs/normalized/concat_hover_filter_normalized.vl.json @@ -1,9 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "Drag out a rectangular brush to highlight points.", - "data": { - "url": "data/cars.json" - }, + "data": {"url": "data/cars.json"}, "hconcat": [ { "layer": [ @@ -13,38 +11,16 @@ ], "mark": "point", "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Miles_per_Gallon", - "type": "quantitative" - } + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"} } }, { - "mark": { - "type": "point", - "color": "goldenrod" - }, - "transform": [ - { - "filter": { - "param": "hover", - "empty": false - } - } - ], + "mark": {"type": "point", "color": "goldenrod"}, + "transform": [{"filter": {"param": "hover", "empty": false}}], "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Miles_per_Gallon", - "type": "quantitative" - } + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"} } } ] @@ -57,41 +33,19 @@ ], "mark": "point", "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Acceleration", - "type": "quantitative" - } + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Acceleration", "type": "quantitative"} } }, { - "mark": { - "type": "point", - "color": "goldenrod" - }, - "transform": [ - { - "filter": { - "param": "hover", - "empty": false - } - } - ], + "mark": {"type": "point", "color": "goldenrod"}, + "transform": [{"filter": {"param": "hover", "empty": false}}], "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Acceleration", - "type": "quantitative" - } + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Acceleration", "type": "quantitative"} } } ] } ] -} +} \ No newline at end of file diff --git a/examples/specs/normalized/interactive_global_development_normalized.vl.json b/examples/specs/normalized/interactive_global_development_normalized.vl.json index 8bd7f9b5e6..9338c9f947 100644 --- a/examples/specs/normalized/interactive_global_development_normalized.vl.json +++ b/examples/specs/normalized/interactive_global_development_normalized.vl.json @@ -1,9 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "An interactive scatter plot of global health statistics by country and year.", - "data": { - "url": "data/gapminder.json" - }, + "data": {"url": "data/gapminder.json"}, "width": 800, "height": 500, "layer": [ @@ -15,23 +13,10 @@ "y": 250, "opacity": 0.06 }, - "encoding": { - "text": { - "field": "year" - } - }, + "encoding": {"text": {"field": "year"}}, "transform": [ - { - "filter": { - "field": "country", - "equal": "Afghanistan" - } - }, - { - "filter": { - "param": "year" - } - } + {"filter": {"field": "country", "equal": "Afghanistan"}}, + {"filter": {"param": "year"}} ] }, { @@ -47,50 +32,24 @@ "x": { "field": "fertility", "type": "quantitative", - "scale": { - "domain": [ - 0, - 9 - ] - }, - "axis": { - "tickCount": 5, - "title": "Fertility" - } + "scale": {"domain": [0, 9]}, + "axis": {"tickCount": 5, "title": "Fertility"} }, "y": { "field": "life_expect", "type": "quantitative", - "scale": { - "domain": [ - 20, - 85 - ] - }, - "axis": { - "tickCount": 5, - "title": "Life Expectancy" - } - }, - "detail": { - "field": "country" - }, - "order": { - "field": "year" + "scale": {"domain": [20, 85]}, + "axis": {"tickCount": 5, "title": "Life Expectancy"} }, + "detail": {"field": "country"}, + "order": {"field": "year"}, "opacity": { "condition": { "value": 0.8, "test": { "or": [ - { - "param": "hovered", - "empty": false - }, - { - "param": "clicked", - "empty": false - } + {"param": "hovered", "empty": false}, + {"param": "clicked", "empty": false} ] } }, @@ -102,17 +61,8 @@ "params": [ { "name": "year", - "value": [ - { - "year": 1955 - } - ], - "select": { - "type": "point", - "fields": [ - "year" - ] - }, + "value": [{"year": 1955}], + "select": {"type": "point", "fields": ["year"]}, "bind": { "name": "Year", "input": "range", @@ -125,69 +75,33 @@ "name": "hovered", "select": { "type": "point", - "fields": [ - "country" - ], + "fields": ["country"], "toggle": false, "on": "pointerover" } }, { "name": "clicked", - "select": { - "type": "point", - "fields": [ - "country" - ] - } + "select": {"type": "point", "fields": ["country"]} } ], - "mark": { - "type": "circle", - "size": 100, - "opacity": 0.9 - }, + "mark": {"type": "circle", "size": 100, "opacity": 0.9}, "encoding": { "x": { "field": "fertility", "type": "quantitative", - "scale": { - "domain": [ - 0, - 9 - ] - }, - "axis": { - "tickCount": 5, - "title": "Fertility" - } + "scale": {"domain": [0, 9]}, + "axis": {"tickCount": 5, "title": "Fertility"} }, "y": { "field": "life_expect", "type": "quantitative", - "scale": { - "domain": [ - 20, - 85 - ] - }, - "axis": { - "tickCount": 5, - "title": "Life Expectancy" - } + "scale": {"domain": [20, 85]}, + "axis": {"tickCount": 5, "title": "Life Expectancy"} }, - "color": { - "field": "name", - "title": "Region" - } + "color": {"field": "name", "title": "Region"} }, - "transform": [ - { - "filter": { - "param": "year" - } - } - ] + "transform": [{"filter": {"param": "year"}}] }, { "mark": { @@ -200,56 +114,27 @@ "x": { "field": "fertility", "type": "quantitative", - "scale": { - "domain": [ - 0, - 9 - ] - }, - "axis": { - "tickCount": 5, - "title": "Fertility" - } + "scale": {"domain": [0, 9]}, + "axis": {"tickCount": 5, "title": "Fertility"} }, "y": { "field": "life_expect", "type": "quantitative", - "scale": { - "domain": [ - 20, - 85 - ] - }, - "axis": { - "tickCount": 5, - "title": "Life Expectancy" - } + "scale": {"domain": [20, 85]}, + "axis": {"tickCount": 5, "title": "Life Expectancy"} }, - "text": { - "field": "country" - }, - "color": { - "field": "name", - "title": "Region" - } + "text": {"field": "country"}, + "color": {"field": "name", "title": "Region"} }, "transform": [ { "filter": { "and": [ - { - "param": "year" - }, + {"param": "year"}, { "or": [ - { - "param": "clicked", - "empty": false - }, - { - "param": "hovered", - "empty": false - } + {"param": "clicked", "empty": false}, + {"param": "hovered", "empty": false} ] } ] @@ -270,87 +155,39 @@ "x": { "field": "fertility", "type": "quantitative", - "scale": { - "domain": [ - 0, - 9 - ] - }, - "axis": { - "tickCount": 5, - "title": "Fertility" - } + "scale": {"domain": [0, 9]}, + "axis": {"tickCount": 5, "title": "Fertility"} }, "y": { "field": "life_expect", "type": "quantitative", - "scale": { - "domain": [ - 20, - 85 - ] - }, - "axis": { - "tickCount": 5, - "title": "Life Expectancy" - } + "scale": {"domain": [20, 85]}, + "axis": {"tickCount": 5, "title": "Life Expectancy"} }, - "text": { - "field": "year" - } + "text": {"field": "year"} } }, { - "mark": { - "type": "circle", - "color": "gray" - }, + "mark": {"type": "circle", "color": "gray"}, "encoding": { "x": { "field": "fertility", "type": "quantitative", - "scale": { - "domain": [ - 0, - 9 - ] - }, - "axis": { - "tickCount": 5, - "title": "Fertility" - } + "scale": {"domain": [0, 9]}, + "axis": {"tickCount": 5, "title": "Fertility"} }, "y": { "field": "life_expect", "type": "quantitative", - "scale": { - "domain": [ - 20, - 85 - ] - }, - "axis": { - "tickCount": 5, - "title": "Life Expectancy" - } + "scale": {"domain": [20, 85]}, + "axis": {"tickCount": 5, "title": "Life Expectancy"} } } } ], "transform": [ - { - "filter": { - "param": "hovered", - "empty": false - } - }, - { - "filter": { - "not": { - "param": "year" - } - } - } + {"filter": {"param": "hovered", "empty": false}}, + {"filter": {"not": {"param": "year"}}} ] } ], @@ -359,35 +196,15 @@ "lookup": "cluster", "from": { "key": "id", - "fields": [ - "name" - ], + "fields": ["name"], "data": { "values": [ - { - "id": 0, - "name": "South Asia" - }, - { - "id": 1, - "name": "Europe & Central Asia" - }, - { - "id": 2, - "name": "Sub-Saharan Africa" - }, - { - "id": 3, - "name": "America" - }, - { - "id": 4, - "name": "East Asia & Pacific" - }, - { - "id": 5, - "name": "Middle East & North Africa" - } + {"id": 0, "name": "South Asia"}, + {"id": 1, "name": "Europe & Central Asia"}, + {"id": 2, "name": "Sub-Saharan Africa"}, + {"id": 3, "name": "America"}, + {"id": 4, "name": "East Asia & Pacific"}, + {"id": 5, "name": "Middle East & North Africa"} ] } } @@ -395,4 +212,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/examples/specs/normalized/interactive_line_hover_normalized.vl.json b/examples/specs/normalized/interactive_line_hover_normalized.vl.json index 648526b2c1..f1ef97fbf6 100644 --- a/examples/specs/normalized/interactive_line_hover_normalized.vl.json +++ b/examples/specs/normalized/interactive_line_hover_normalized.vl.json @@ -1,9 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "Multi-series line chart with labels and interactive highlight on hover. We also set the selection's initial value to provide a better screenshot", - "data": { - "url": "data/stocks.csv" - }, + "data": {"url": "data/stocks.csv"}, "layer": [ { "description": "transparent layer to make it easier to trigger selection", @@ -14,22 +12,10 @@ "select": {"type": "point", "fields": ["symbol"], "on": "pointerover"} } ], - "mark": { - "type": "line", - "strokeWidth": 8, - "stroke": "transparent" - }, + "mark": {"type": "line", "strokeWidth": 8, "stroke": "transparent"}, "encoding": { - "x": { - "field": "date", - "type": "temporal", - "title": "date" - }, - "y": { - "field": "price", - "type": "quantitative", - "title": "price" - }, + "x": {"field": "date", "type": "temporal", "title": "date"}, + "y": {"field": "price", "type": "quantitative", "title": "price"}, "color": { "condition": { "param": "hover", @@ -39,28 +25,14 @@ }, "value": "grey" }, - "opacity": { - "condition": { - "param": "hover", - "value": 1 - }, - "value": 0.2 - } + "opacity": {"condition": {"param": "hover", "value": 1}, "value": 0.2} } }, { "mark": "line", "encoding": { - "x": { - "field": "date", - "type": "temporal", - "title": "date" - }, - "y": { - "field": "price", - "type": "quantitative", - "title": "price" - }, + "x": {"field": "date", "type": "temporal", "title": "date"}, + "y": {"field": "price", "type": "quantitative", "title": "price"}, "color": { "condition": { "param": "hover", @@ -70,21 +42,13 @@ }, "value": "grey" }, - "opacity": { - "condition": { - "param": "hover", - "value": 1 - }, - "value": 0.2 - } + "opacity": {"condition": {"param": "hover", "value": 1}, "value": 0.2} } }, { "layer": [ { - "mark": { - "type": "circle" - }, + "mark": {"type": "circle"}, "encoding": { "x": { "field": "date", @@ -96,9 +60,7 @@ "field": "price", "type": "quantitative", "title": "price", - "aggregate": { - "argmax": "date" - } + "aggregate": {"argmax": "date"} }, "color": { "condition": { @@ -110,20 +72,13 @@ "value": "grey" }, "opacity": { - "condition": { - "param": "hover", - "value": 1 - }, + "condition": {"param": "hover", "value": 1}, "value": 0.2 } } }, { - "mark": { - "type": "text", - "align": "left", - "dx": 4 - }, + "mark": {"type": "text", "align": "left", "dx": 4}, "encoding": { "x": { "field": "date", @@ -135,9 +90,7 @@ "field": "price", "type": "quantitative", "title": "price", - "aggregate": { - "argmax": "date" - } + "aggregate": {"argmax": "date"} }, "color": { "condition": { @@ -149,29 +102,15 @@ "value": "grey" }, "opacity": { - "condition": { - "param": "hover", - "value": 1 - }, + "condition": {"param": "hover", "value": 1}, "value": 0.2 }, - "text": { - "field": "symbol", - "type": "nominal" - } + "text": {"field": "symbol", "type": "nominal"} } } ] } ], - "config": { - "view": { - "stroke": null - } - }, - "transform": [ - { - "filter": "datum.symbol!=='IBM'" - } - ] -} + "config": {"view": {"stroke": null}}, + "transform": [{"filter": "datum.symbol!=='IBM'"}] +} \ No newline at end of file diff --git a/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json b/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json index 591bf4e423..67a5af7496 100644 --- a/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json +++ b/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json @@ -1,8 +1,6 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "data": { - "url": "data/stocks.csv" - }, + "data": {"url": "data/stocks.csv"}, "width": 400, "height": 300, "layer": [ @@ -11,18 +9,9 @@ { "mark": "line", "encoding": { - "x": { - "field": "date", - "type": "temporal" - }, - "y": { - "field": "price", - "type": "quantitative" - }, - "color": { - "field": "symbol", - "type": "nominal" - } + "x": {"field": "date", "type": "temporal"}, + "y": {"field": "price", "type": "quantitative"}, + "color": {"field": "symbol", "type": "nominal"} } }, { @@ -31,9 +20,7 @@ "name": "label", "select": { "type": "point", - "encodings": [ - "x" - ], + "encodings": ["x"], "nearest": true, "on": "pointerover" } @@ -41,24 +28,11 @@ ], "mark": "point", "encoding": { - "x": { - "field": "date", - "type": "temporal" - }, - "y": { - "field": "price", - "type": "quantitative" - }, - "color": { - "field": "symbol", - "type": "nominal" - }, + "x": {"field": "date", "type": "temporal"}, + "y": {"field": "price", "type": "quantitative"}, + "color": {"field": "symbol", "type": "nominal"}, "opacity": { - "condition": { - "param": "label", - "empty": false, - "value": 1 - }, + "condition": {"param": "label", "empty": false, "value": 1}, "value": 0 } } @@ -68,16 +42,9 @@ { "layer": [ { - "mark": { - "type": "rule", - "color": "gray" - }, + "mark": {"type": "rule", "color": "gray"}, "encoding": { - "x": { - "type": "temporal", - "field": "date", - "aggregate": "min" - } + "x": {"type": "temporal", "field": "date", "aggregate": "min"} } }, { @@ -92,57 +59,24 @@ "dy": -5 }, "encoding": { - "text": { - "type": "quantitative", - "field": "price" - }, - "x": { - "type": "temporal", - "field": "date" - }, - "y": { - "type": "quantitative", - "field": "price" - } + "text": {"type": "quantitative", "field": "price"}, + "x": {"type": "temporal", "field": "date"}, + "y": {"type": "quantitative", "field": "price"} } }, { - "mark": { - "type": "text", - "align": "left", - "dx": 5, - "dy": -5 - }, + "mark": {"type": "text", "align": "left", "dx": 5, "dy": -5}, "encoding": { - "text": { - "type": "quantitative", - "field": "price" - }, - "x": { - "type": "temporal", - "field": "date" - }, - "y": { - "type": "quantitative", - "field": "price" - }, - "color": { - "type": "nominal", - "field": "symbol" - } + "text": {"type": "quantitative", "field": "price"}, + "x": {"type": "temporal", "field": "date"}, + "y": {"type": "quantitative", "field": "price"}, + "color": {"type": "nominal", "field": "symbol"} } } ] } ], - "transform": [ - { - "filter": { - "param": "label", - "empty": false - } - } - ] + "transform": [{"filter": {"param": "label", "empty": false}}] } ] -} +} \ No newline at end of file diff --git a/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json b/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json index c10f13fed3..d2dd6225ac 100644 --- a/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json +++ b/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json @@ -1,67 +1,29 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "data": { - "url": "data/seattle-weather.csv" - }, + "data": {"url": "data/seattle-weather.csv"}, "layer": [ { - "mark": { - "type": "line", - "color": "orange" - }, + "mark": {"type": "line", "color": "orange"}, "encoding": { - "x": { - "timeUnit": "yearmonthdate", - "field": "date" - }, + "x": {"timeUnit": "yearmonthdate", "field": "date"}, "tooltip": [ - { - "timeUnit": "yearmonthdate", - "field": "date" - }, - { - "field": "temp_max", - "type": "quantitative" - }, - { - "field": "temp_min", - "type": "quantitative" - } + {"timeUnit": "yearmonthdate", "field": "date"}, + {"field": "temp_max", "type": "quantitative"}, + {"field": "temp_min", "type": "quantitative"} ], - "y": { - "field": "temp_max", - "type": "quantitative" - } + "y": {"field": "temp_max", "type": "quantitative"} } }, { - "mark": { - "type": "line", - "color": "red" - }, + "mark": {"type": "line", "color": "red"}, "encoding": { - "x": { - "timeUnit": "yearmonthdate", - "field": "date" - }, + "x": {"timeUnit": "yearmonthdate", "field": "date"}, "tooltip": [ - { - "timeUnit": "yearmonthdate", - "field": "date" - }, - { - "field": "temp_max", - "type": "quantitative" - }, - { - "field": "temp_min", - "type": "quantitative" - } + {"timeUnit": "yearmonthdate", "field": "date"}, + {"field": "temp_max", "type": "quantitative"}, + {"field": "temp_min", "type": "quantitative"} ], - "y": { - "field": "temp_min", - "type": "quantitative" - } + "y": {"field": "temp_min", "type": "quantitative"} } }, { @@ -70,38 +32,18 @@ {"name": "hover", "select": {"type": "point", "on": "pointerover"}} ], "encoding": { - "x": { - "timeUnit": "yearmonthdate", - "field": "date" - }, + "x": {"timeUnit": "yearmonthdate", "field": "date"}, "tooltip": [ - { - "timeUnit": "yearmonthdate", - "field": "date" - }, - { - "field": "temp_max", - "type": "quantitative" - }, - { - "field": "temp_min", - "type": "quantitative" - } + {"timeUnit": "yearmonthdate", "field": "date"}, + {"field": "temp_max", "type": "quantitative"}, + {"field": "temp_min", "type": "quantitative"} ], "color": { - "condition": { - "param": "hover", - "empty": false, - "value": "black" - }, + "condition": {"param": "hover", "empty": false, "value": "black"}, "value": "transparent" } } } ], - "config": { - "axisY": { - "minExtent": 30 - } - } -} + "config": {"axisY": {"minExtent": 30}} +} \ No newline at end of file diff --git a/examples/specs/normalized/interactive_stocks_nearest_index_normalized.vl.json b/examples/specs/normalized/interactive_stocks_nearest_index_normalized.vl.json index 9450c8262f..37ad5678fb 100644 --- a/examples/specs/normalized/interactive_stocks_nearest_index_normalized.vl.json +++ b/examples/specs/normalized/interactive_stocks_nearest_index_normalized.vl.json @@ -2,25 +2,14 @@ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "width": 600, "height": 300, - "data": { - "url": "data/stocks.csv" - }, + "data": {"url": "data/stocks.csv"}, "layer": [ { "mark": "line", "encoding": { - "x": { - "field": "date", - "type": "temporal" - }, - "y": { - "field": "price", - "type": "quantitative" - }, - "color": { - "field": "symbol", - "type": "nominal" - } + "x": {"field": "date", "type": "temporal"}, + "y": {"field": "price", "type": "quantitative"}, + "color": {"field": "symbol", "type": "nominal"} } }, { @@ -35,78 +24,27 @@ } } ], - "mark": { - "type": "point" - }, + "mark": {"type": "point"}, "encoding": { - "x": { - "field": "date", - "type": "temporal" - }, - "y": { - "field": "price", - "type": "quantitative" - }, - "opacity": { - "value": 0 - } + "x": {"field": "date", "type": "temporal"}, + "y": {"field": "price", "type": "quantitative"}, + "opacity": {"value": 0} } }, { "mark": "rule", - "transform": [ - { - "filter": { - "and": [ - "index.date", - { - "param": "index" - } - ] - } - } - ], - "encoding": { - "x": { - "field": "date", - "type": "temporal" - } - } + "transform": [{"filter": {"and": ["index.date", {"param": "index"}]}}], + "encoding": {"x": {"field": "date", "type": "temporal"}} }, { "mark": "text", "encoding": { - "x": { - "field": "date", - "type": "temporal" - }, - "y": { - "value": 10 - }, - "text": { - "field": "date", - "type": "temporal" - } + "x": {"field": "date", "type": "temporal"}, + "y": {"value": 10}, + "text": {"field": "date", "type": "temporal"} }, - "transform": [ - { - "filter": { - "and": [ - "index.date", - { - "param": "index" - } - ] - } - } - ] + "transform": [{"filter": {"and": ["index.date", {"param": "index"}]}}] } ], - "config": { - "text": { - "align": "right", - "dx": -5, - "dy": 5 - } - } -} + "config": {"text": {"align": "right", "dx": -5, "dy": 5}} +} \ No newline at end of file diff --git a/examples/specs/selection_composition_and.vl.json b/examples/specs/selection_composition_and.vl.json index d4fa0deb4a..b0f96323ad 100644 --- a/examples/specs/selection_composition_and.vl.json +++ b/examples/specs/selection_composition_and.vl.json @@ -1,8 +1,6 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "data": { - "url": "data/cars.json" - }, + "data": {"url": "data/cars.json"}, "params": [ { "name": "alex", @@ -24,26 +22,14 @@ ], "mark": "rect", "encoding": { - "y": { - "field": "Origin", - "type": "ordinal" - }, - "x": { - "field": "Cylinders", - "type": "ordinal" - }, + "y": {"field": "Origin", "type": "ordinal"}, + "x": {"field": "Cylinders", "type": "ordinal"}, "color": { "condition": { - "test": { - "and": [ - { - "param": "alex" - }, - { - "param": "morgan" - } - ] - }, + "test": {"and": [ + {"param": "alex"}, + {"param": "morgan"} + ]}, "aggregate": "count" }, "value": "grey" diff --git a/examples/specs/selection_interval_mark_style.vl.json b/examples/specs/selection_interval_mark_style.vl.json index d5b79897f5..2d3602652a 100644 --- a/examples/specs/selection_interval_mark_style.vl.json +++ b/examples/specs/selection_interval_mark_style.vl.json @@ -1,8 +1,6 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "data": { - "url": "data/cars.json" - }, + "data": {"url": "data/cars.json"}, "params": [ { "name": "alex", @@ -24,14 +22,8 @@ ], "mark": "rect", "encoding": { - "y": { - "field": "Origin" - }, - "x": { - "field": "Cylinders" - }, - "color": { - "aggregate": "count" - } + "y": {"field": "Origin"}, + "x": {"field": "Cylinders"}, + "color": {"aggregate": "count"} } } diff --git a/examples/specs/selection_multi_condition.vl.json b/examples/specs/selection_multi_condition.vl.json index aa8b057df5..98334d62cd 100644 --- a/examples/specs/selection_multi_condition.vl.json +++ b/examples/specs/selection_multi_condition.vl.json @@ -1,14 +1,9 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "Drag out a rectangular brush to highlight points.", - "data": { - "url": "data/cars.json" - }, + "data": {"url": "data/cars.json"}, "params": [ - { - "name": "brush", - "select": "interval" - }, + {"name": "brush", "select": "interval"}, { "name": "hoverbrush", "select": { @@ -19,24 +14,12 @@ ], "mark": "point", "encoding": { - "x": { - "field": "Horsepower", - "type": "quantitative" - }, - "y": { - "field": "Miles_per_Gallon", - "type": "quantitative" - }, + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "color": { "condition": [ - { - "param": "hoverbrush", - "value": "teal" - }, - { - "param": "brush", - "value": "skyblue" - } + {"param": "hoverbrush", "value": "teal"}, + {"param": "brush", "value": "skyblue"} ], "value": "grey" } diff --git a/examples/specs/selection_translate_scatterplot_shift-drag.vl.json b/examples/specs/selection_translate_scatterplot_shift-drag.vl.json index e919d8facd..406b413233 100644 --- a/examples/specs/selection_translate_scatterplot_shift-drag.vl.json +++ b/examples/specs/selection_translate_scatterplot_shift-drag.vl.json @@ -12,28 +12,13 @@ "mark": "circle", "encoding": { "x": { - "field": "Horsepower", - "type": "quantitative", - "scale": { - "domain": [ - 75, - 150 - ] - } + "field": "Horsepower", "type": "quantitative", + "scale": {"domain": [75, 150]} }, "y": { - "field": "Miles_per_Gallon", - "type": "quantitative", - "scale": { - "domain": [ - 20, - 40 - ] - } + "field": "Miles_per_Gallon", "type": "quantitative", + "scale": {"domain": [20, 40]} }, - "size": { - "field": "Cylinders", - "type": "quantitative" - } + "size": {"field": "Cylinders", "type": "quantitative"} } } diff --git a/examples/specs/trellis_selections.vl.json b/examples/specs/trellis_selections.vl.json index e66afe2dea..adcea7a106 100644 --- a/examples/specs/trellis_selections.vl.json +++ b/examples/specs/trellis_selections.vl.json @@ -1,18 +1,14 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "description": "Anscombe's Quartet", - "data": { - "url": "data/anscombe.json" - }, + "data": {"url": "data/anscombe.json"}, "mark": "circle", "params": [ { "name": "brush", "select": { "type": "interval", - "encodings": [ - "x" - ], + "encodings": ["x"], "resolve": "intersect", "on": "[pointerdown[event.shiftKey], pointerup] > pointermove", "translate": "[pointerdown[event.shiftKey], pointerup] > pointermove" @@ -31,42 +27,29 @@ "name": "xenc", "select": { "type": "point", - "fields": [ - "X" - ], + "fields": ["X"], "resolve": "global", "on": "pointerover", "nearest": true }, - "bind": { - "input": "number" - } + "bind": {"input": "number"} } ], "encoding": { - "column": { - "field": "Series" - }, + "column": {"field": "Series"}, "x": { "field": "X", "type": "quantitative", - "scale": { - "zero": false - } + "scale": {"zero": false} }, "y": { "field": "Y", "type": "quantitative", - "scale": { - "zero": false - } + "scale": {"zero": false} }, "size": { "value": 100, - "condition": { - "param": "brush", - "value": 250 - } + "condition": {"param": "brush", "value": 250} }, "color": { "value": "steelblue", @@ -75,8 +58,6 @@ "value": "red" } }, - "opacity": { - "value": 1 - } + "opacity": {"value": 1} } }