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
Clearly, I am struggling with the usage of vega lite API and not able to infer how to chain the whole API methods together.