Vega lite - Labels and background colour #8619
Answered
by
jwoLondon
GeorgeRobbin
asked this question in
Q&A
-
1 - Im attempting to create a chart which displays 4 sections based on values on each axis (-x,-y)(-x,y)(-y,x)(xy), is there a way to set a separate background colour for each section? |
Beta Was this translation helpful? Give feedback.
Answered by
jwoLondon
Jan 1, 2023
Replies: 1 comment
-
The key here is to use layers – one for your background quadrants, one for the dots and one for the labels. Here's one approach that uses the rect mark to draw the quadrants each with a custom colour determined by inline data. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
domoritz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The key here is to use layers – one for your background quadrants, one for the dots and one for the labels. Here's one approach that uses the rect mark to draw the quadrants each with a custom colour determined by inline data.