英文:
power BI Vega Lite mark color lighter
问题
我有以下示例:
https://vega.github.io/vega-lite/examples/circle_github_punchcard.html
我需要将颜色比例包括在内。
为此,我尝试了一些选项,结果如下:
editor
您可以看到颜色略有不同。我如何使它的颜色保持一致?
英文:
I have the following example:
https://vega.github.io/vega-lite/examples/circle_github_punchcard.html
I need this to include color scaling.
For this I have tried some options which resulted in the following:
editor
You can see the slight difference in color. How can I make it a consistent color?
答案1
得分: 0
因为您的数据集为C重复了2022个值,所以出现了这个情况。
只需在编码部分直接添加opacity设置:
"encoding": {
"opacity": {"value": 1}
}
英文:
The reason for this is because your dataset as duplicate 2022 values for C.
Simply add the opacity setting directly within the encoding section:
"encoding": {
"opacity": {"value": 1},
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论