I was referring to pie chart examples of vega-lite. I modified one of them to show percentage values as follows: This works perfectly and renders following: However, I wanted those percentage labels in black color. So I referred text mark and tried following: But this does not makes any changes to above output. I also tried putting color as encoding:
Tag: vega
Vega-lite: Legend label expression to include value of multiple fields
My code is as follows; Below is the link to the vega editor. https://vega.github.io/editor/#/gist/947b2a99801bc6a08d468cdb9acbeb50/legend.json My aim is to show the legend to include value of 2 fields i.e. type and count fields with a hyphen. Example : In the image below, I wanted to show the legends as ‘Apple – twenty’ and ‘Mango – ten’ How could I do the