Search code examples
powerbivega-lite

power BI Vega Lite mark color lighter


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?


Solution

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