What you can do is add the same data source for either image, and changes the color values accordingly, for example:
{
"title": "draw",
"description": "",
"inputs": {
"input_global_trp": {
"options": {
"defaultValue": "-24h@h,now",
"token": "global_time"
},
"title": "Global Time Range",
"type": "input.timerange"
}
},
"defaults": {
"dataSources": {
"ds.o11y": {
"options": {
"queryParameters": {
"earliest": "$global_time.earliest$",
"latest": "$global_time.latest$"
}
}
},
"ds.search": {
"options": {
"queryParameters": {
"earliest": "$global_time.earliest$",
"latest": "$global_time.latest$"
}
}
}
},
"visualizations": {
"global": {
"showProgressBar": true
}
}
},
"visualizations": {
"viz_OpC1vLYF": {
"context": {
"fillColorEditorConfig": [
{
"to": 5,
"value": "#000000"
},
{
"from": 5,
"value": "#ffffff"
}
],
"fillDataValue": "> primary | seriesByType(\"number\") | lastPoint()"
},
"dataSources": {
"primary": "ds_FPMB4FhR"
},
"options": {
"fillColor": "> fillDataValue | rangeValue(fillColorEditorConfig)"
},
"type": "splunk.rectangle"
},
"viz_ksk466cv": {
"context": {
"fillColorEditorConfig": [
{
"to": 5,
"value": "#D41F1F"
},
{
"from": 5,
"value": "#118832"
}
],
"fillDataValue": "> primary | seriesByType(\"number\") | lastPoint()"
},
"dataSources": {
"primary": "ds_FPMB4FhR"
},
"eventHandlers": [
{
"options": {
"tokens": [
{
"key": "row.<fieldname>.value",
"token": "value"
}
]
},
"type": "drilldown.setToken"
}
],
"options": {
"fillColor": "> fillDataValue | rangeValue(fillColorEditorConfig)"
},
"type": "splunk.ellipse"
}
},
"dataSources": {
"ds_FPMB4FhR": {
"name": "Search_2",
"options": {
"query": "| makeresults count=1\n| eval rand=random()%10+1\n| table rand"
},
"type": "ds.search"
},
"ds_LuczsK7H": {
"name": "Search_1",
"options": {
"query": "| makeresults count=1\n| eval test=$rand$\n| table test"
},
"type": "ds.search"
}
},
"layout": {
"globalInputs": [
"input_global_trp"
],
"layoutDefinitions": {
"layout_1": {
"options": {
"display": "auto",
"height": 960,
"width": 1440
},
"structure": [
{
"item": "viz_OpC1vLYF",
"position": {
"h": 270,
"w": 240,
"x": 550,
"y": 50
},
"type": "block"
},
{
"item": "viz_ksk466cv",
"position": {
"h": 150,
"w": 160,
"x": 590,
"y": 130
},
"type": "block"
}
],
"type": "absolute"
}
},
"options": {},
"tabs": {
"items": [
{
"label": "New tab",
"layoutId": "layout_1"
}
]
}
}
}
... View more