I'm hoping to get pointers for how to include an item in the legend despite the fact that it's not in the data---I tried to add it by way of sort, but that doesn't appear to work---editor link. In this example, I want "Not helpful" to show up in the legend, despite the fact that it was not present in any responses.
I understand that this is somewhat against the whole visual encodings concept, but I think the use case is valid.
Thanks for the help!
You can do this by specifying the scale domain:
"scale": {
"domain": [
"Extremely helpful",
"Very helpful",
"Somewhat helpful",
"Not so helpful",
"Not helpful"
]
}
The result looks like this (view in editor):