which is pretty nice, now, I want to just add a horizontal line in ad-hoc fashion to denote total mean fraction, it is possible in vegalite (probably with :rule?)
@tkf I think you can generally not layer a spec that has a facet (which kind of makes sense). So what you need to do instead is put a facet operator into a top-level spec, which then has a child spec which is a layered spec.
I don’t fully understand right now why this extra @vlplot() is needed as the first element for the layered sub-spec, but hey, it works
I think there are really two things that we could do on the Julia side to make this easier: a) add support for the shorthand parsing to the row field, so that facet={row="Origin:n"} works. b) sort out the composition story… I’ll try to find time to look over some of the proposals we had on that.
I think once they implement this properly in the underlying Vega-Lite library, it will look like this: @vlplot(:rule, y={datum=20}). Until then we’ll have to live with the @vlplot(:rule, data={values=[ref=20}]}, y="ref:q") workaround.