I can't pass a different opacity to the legend symbols than what is given to all the marks. I want the legend symbols to have 100% opacity. On SO, @jakevdp pointed me here!
{
"data": {"url": "https://vega.github.io/vega-datasets/data/cars.json"},
"mark": {"type": "circle", "opacity": 0.1},
"encoding": {
"color": {
"field": "Origin",
"type": "nominal",
"legend": {"symbolOpacity": 1}
},
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"}
}
}
symbolStrokeColor also doesn't work as expected.
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "A bubbleplot showing horsepower on x, miles per gallons on y, and binned acceleration on size.",
"data": {"url": "data/cars.json"},
"mark": "point",
"encoding": {
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"},
"size": {"field": "Acceleration", "type": "quantitative", "legend": {
"symbolStrokeColor": "red"
}}
}
}
Thank you for the bug report @swanderz. Fixed in https://github.com/vega/vega-lite/pull/6724.

I <3 鈥榲ega-lite`! Thanks @domoritz
Most helpful comment
Thank you for the bug report @swanderz. Fixed in https://github.com/vega/vega-lite/pull/6724.