chart = vl
.markPoint()
.data(gsStdVsMean)
.encode(
vl.x().fieldQ("mean").scale({ zero: false }),
vl.y().fieldQ("std").scale({ zero: false }),
vl.tooltip(["name", "mean", "std"]),
vl.color(
{
condition: {
test: `datum.name == '${highlight}'`,
value: "red"
}
},
{ value: "grey" }
)
)
.height(width * 0.4)
.width(width * 0.6)
.background("floralwhite")
.title(`GameScore Mean vs Std Dev - Pitchers w/ 20+ starts in 2022`)
.render()