Have any of you that are working with Deneb ventured into Vega yet (as opposed to Vega-Lite)? I wanted to explore some of the additional capabilities of Vega, but I’m running into a severe lack of documentation and examples to help me through what seems like a couple of very basic issues.
The first issue I’m having is related to setting the color of a mark. In Vega-Lite, I can use an expression to dynamically set the color of the mark. For example, both of these are valid ways in which I have successfully set the color of a “bar” mark in Vega-Lite:
"color": {"value": {"expr": "pbiColor(3)"}
"style": {
"DefaultStyle": {
"color": {"expr": "datum['Year'] === datum['maxYear'] ? pbiColor(5) : pbiColor(3)"}
}
}
In Vega, however, color is set using the “fill” property (instead of “color”), and it does not want to accept any value calculated by an expression. At first I thought it might be the pbiColor() function, but even if I replace that with pre-defined values like “white” or “blue”, or a hex code like “#00FF00” it doesn’t work.
Does anyone know what I’m doing wrong? Or can you confirm that this is an issue with the Vega spec itself and not user error?
Thanks!