How to annotate mark rules in vega lite api with parallel text or legend?

I have made following visualization:

Now, all I want is to show text parallel to those rules. Say, text saying “Top 10% students” aligned parallel to green dashed line, “Mean D” aligned parallel to black dashed line and “Bottom 10% students” aligned parallel to red dashed line.

I have tried to add matkText() in the above script to render some text annotating the corresponding markRule(). But it does not seem to render. Why is this so? Also can we render legend for the same instead of showing text parallel inside the graph? All examples online demonstrate autogenerating legends like those for markPoint or markArea

Clearly, I am struggling with the usage of vega lite API and not able to infer how to chain the whole API methods together.

Hello Mahesh,

Have you been able to get some help on this issue? If not, maybe this stack overflow forum for vega lite could be a better place to get help on your question - Newest 'vega-lite' Questions - Stack Overflow