Conditional expression to labelColor
in header
is not translated to Vega correctly
#9283
Open
1 task done
Labels
In this spec, I'm setting up conditional color encoding in the same manner for both axis labels and header labels:
However, it only works for the axis labels as can be seen in this screenshot:
Open the Chart in the Vega Editor
Looking at the Vega spec, it seems like VegaLite has translated the
labelExpr
andlabelColor
differentlyIf I manually change
datum.value
toparent[\"c\"]
for the"color"
key, the header labels are colored as expected. If this is a simple case of duplicated some logic fromlabelExpr
intolabelColor
, then I might be able to take a stab at a PR (although it might be a while until I get to it). Any pointers if that's the case and where this is handled in the code base?A couple of other things I noted when working on this:
datum.label
anddatum.value
works for the axis config, but for the header config onlydatum.value
workslabelExpr
takes an expression as a string but not as anexpr
object whereaslabelColor
does the opposite; it would be helpful for harmonize if possible.Checklist
The text was updated successfully, but these errors were encountered: