Power BI Vega Lite标记颜色更亮。

huangapple go评论106阅读模式
英文:

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},

huangapple
  • 本文由 发表于 2023年3月9日 23:17:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/75686585.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定