Skip to content
Advertisement

Having black coloured labels for pie chart in vega lite

I was referring to pie chart examples of vega-lite.

I modified one of them to show percentage values as follows:

JavaScript
JavaScript

This works perfectly and renders following:

enter image description here

However, I wanted those percentage labels in black color. So I referred text mark and tried following:

JavaScript

But this does not makes any changes to above output.

I also tried putting color as encoding:

JavaScript

But it rendered following:

enter image description here

What is going wrong here?

Advertisement

Answer

Try this.

enter image description here

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement