在没有相应数据时强制输入图例

问题描述 投票:1回答:1

我希望获得有关如何在图例中包括项目的指针,尽管事实上它不在数据中---我试图通过排序的方式添加它,但这似乎不起作用- -editor link。在此示例中,我希望“无用”出现在图例中,尽管事实上它没有出现在任何响应中。

我知道这在某种程度上与整个视觉编码概念背道而驰,但是我认为用例是有效的。

感谢您的帮助!

vega-lite
1个回答
0
投票
"scale": { "domain": [ "Extremely helpful", "Very helpful", "Somewhat helpful", "Not so helpful", "Not helpful" ] }

结果看起来像这样(view in editor):enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.