@vananhnguyen For that we need to know what value comes to map it with a color. We can transpose the result and set the result as column values and set the colors. Please check the following run anywhere example. makeresults is just used to create a set of dummy data {
"visualizations": {
"viz_PKMJkTej": {
"type": "splunk.column",
"options": {
"y": "> primary | frameBySeriesNames('count','Critical','Failure','Info','Success')",
"seriesColorsByField": {
"Critical": "#dc4e41",
"Failure": "#f8be34",
"Success": "#53a051",
"Info": "#0051B5"
},
"x": "> primary | seriesByName('count')",
"y2": "> primary | frameBySeriesNames('Critical','Failure','Info','Success')"
},
"dataSources": {
"primary": "ds_Lmyq9G4p"
}
}
},
"dataSources": {
"ds_Lmyq9G4p": {
"type": "ds.search",
"options": {
"query": "| makeresults count=100 \n| eval value=random() \n| eval status=case(value%2==0,\"Success\",value%3==0,\"Failure\",value%4==0,\"Warning\",value%5==0,\"Critical\",1==1,\"Info\") \n| stats count by status \n| transpose header_field=status column_name=count"
},
"name": "Search_1"
}
},
"defaults": {
"dataSources": {
"ds.search": {
"options": {
"queryParameters": {
"latest": "$global_time.latest$",
"earliest": "$global_time.earliest$"
}
}
}
}
},
"inputs": {
"input_global_trp": {
"type": "input.timerange",
"options": {
"token": "global_time",
"defaultValue": "-24h@h,now"
},
"title": "Global Time Range"
}
},
"layout": {
"type": "absolute",
"options": {
"width": 1440,
"height": 960,
"display": "auto"
},
"structure": [
{
"item": "viz_PKMJkTej",
"type": "block",
"position": {
"x": 0,
"y": 0,
"w": 1010,
"h": 300
}
}
],
"globalInputs": [
"input_global_trp"
]
},
"description": "",
"title": "Static Colors"
}
... View more