Hi Guys.
I have the following 2 pieces of code that i need to combine.
For some reason whatever i tried returned an error.
For a json guy it should be easy.
So, any json guys in the crowd?
I doont usually ask, but i am stuck.
Any help would be appreciated.
Original Code:
{
"visualizations": {
"viz_qQYRT8eW": {
"type": "viz.choropleth.svg",
"options": {
"svg": "splunk-enterprise-kvstore://5f927a151aae2b14cc002d1f"
},
"dataSources": {
"primary": "ds_R1bxrMSm"
}
}
},
"dataSources": {
"ds_2zE59xyB": {
"type": "ds.search",
"options": {
"query": "| makeresults | append [| makeresults | eval id=\"r\" | eval count=0] | append [| makeresults | eval id=\"D\" | eval count=1] | append [| makeresults | eval id=\"y\" | eval count=2] | append [| makeresults | eval id=\"g\" | eval count=3] | table id count | search id =D"
},
"name": "Search_1"
},
"ds_R1bxrMSm": {
"type": "ds.search",
"options": {
"query": "| makeresults | append [| makeresults | eval id=\"r\" | eval count=0] | append [| makeresults | eval id=\"Dubai\" | eval count=1] | append [| makeresults | eval id=\"y\" | eval count=2] | append [| makeresults | eval id=\"g\" | eval count=3] | table id count | search id =Dubai"
},
"name": "Search_2"
}
},
"inputs": {},
"layout": {
"globalInputs": [],
"type": "absolute",
"options": {},
"structure": [
{
"item": "viz_qQYRT8eW",
"type": "block",
"position": {
"x": 0,
"y": 0,
"w": 490,
"h": 420
}
}
]
},
"description": "",
"title": "11"
}
The code i need to add:
"encoding": {
"featureId": "primary[0]",
"fill": {
"field": "primary[1]",
"value": "primary[1]",
"format": {
"type": "rangevalue",
"ranges": [
{
"from": 50000,
"value": "#4beba8"
},
{
"from": 30000,
"to": 50000,
"value": "#f4df7a"
},
{
"from": 1000,
"to": 30000,
"value": "#fc9850"
},
{
"to": 1000,
"value": "#ff7152"
}
Thanks Again…