Last active
December 11, 2017 23:44
-
-
Save thechriskent/5bd82b5d7b4db308f15eefb252fd9d96 to your computer and use it in GitHub Desktop.
Quick sample of applying customized colors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://gist.githubusercontent.com/thechriskent/2e09be14a4b491cfae256220cfca6310/raw/eb9f675bf523208eb840c462d4f716fa92ce14c2/columnFormattingSchema.json", | |
"elmType": "div", | |
"txtContent": "@currentField", | |
"style": { | |
"color": { | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value1" | |
] | |
}, | |
"lime", | |
{ | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value2" | |
] | |
}, | |
"yellow", | |
{ | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value3" | |
] | |
}, | |
"red", | |
{ | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value4" | |
] | |
}, | |
"blue", | |
"fuschia" | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"background-color": { | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value1" | |
] | |
}, | |
"yellow", | |
{ | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value2" | |
] | |
}, | |
"purple", | |
{ | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value3" | |
] | |
}, | |
"black", | |
{ | |
"operator": "?", | |
"operands": [ | |
{ | |
"operator": "==", | |
"operands": [ | |
"@currentField", | |
"Value4" | |
] | |
}, | |
"grey", | |
"brown" | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment