Hi all,
I want to create a table in which row colours change based on row value. In attachment source code
following my last post, I think this should hopefully work for you.
{
"type": "splunk.table",
"dataSources": {
"primary": "ds_b4QqXqtO"
},
"options": {
"tableFormat": {
"rowBackgroundColors": "> table | seriesByName(\"file\") | matchValue(tableRowBackgroundColor)"
}
},
"context": {
"tableRowBackgroundColor": [
{
"match": "ce",
"value": "#4E79A7"
},
{
"match": "edit",
"value": "#F28E2B"
},
{
"match": "service_overview",
"value": "#E15759"
},
{
"match": "e2e_ritm",
"value": "#76B7B2"
},
{
"match": "e2e_task",
"value": "#59A14F"
},
{
"match": "monitor",
"value": "#EDC948"
},
{
"match": "sla__time_to_first_response",
"value": "#B07AA1"
},
{
"match": "sla__time_to_resolution",
"value": "#FF9DA7"
},
{
"match": "*",
"value": "#FFFFFF"
}
]
},
"containerOptions": {},
"showProgressBar": false,
"showLastUpdated": false
}
🌟 Did this answer help you? If so, please consider:
Your feedback encourages the volunteers in this community to continue contributing
Hi @Federico92
Here is an example we should hopefully help:
{
"type": "splunk.table",
"dataSources": {
"primary": "ds_aOEeGNWG"
},
"options": {
"tableFormat": {
"rowBackgroundColors": "> table | seriesByName(\"host\") | matchValue(tableRowBackgroundColor)"
}
},
"context": {
"tableRowBackgroundColor": [
{
"match": "macdev",
"value": "#FF0000"
},
{
"match": "cultivar",
"value": "#00FF00"
},
{
"match": "*",
"value": "#FFFFFF"
}
]
},
"containerOptions": {},
"showProgressBar": false,
"showLastUpdated": false
}
🌟 Did this answer help you? If so, please consider:
Your feedback encourages the volunteers in this community to continue contributing