Hello,
I am using custom image map viz and I want to pass the token "image" to define different image name depending on the search result
<panel>
<title>Site Structure</title>
<viz type="custom-image-map-viz.map_viz">
<search>
<query> |MY SEARCH
<done>
<set token="image">$result.site_image_type$</set>
</done>
</search>
<option name="custom-image-map-viz.map_viz.allPopups">0</option>
<option name="custom-image-map-viz.map_viz.backgroundColor">#006d9c</option>
<option name="custom-image-map-viz.map_viz.defaultHeight">600</option>
<option name="custom-image-map-viz.map_viz.drilldown">0</option>
<option name="custom-image-map-viz.map_viz.focusClicked">0</option>
<option name="custom-image-map-viz.map_viz.fullScreen">0</option>
<option name="custom-image-map-viz.map_viz.mapCenterX">300</option>
<option name="custom-image-map-viz.map_viz.mapCenterY">380</option>
<option name="custom-image-map-viz.map_viz.mapCenterZoom">0</option>
<option name="custom-image-map-viz.map_viz.mapHeight">701</option>
<option name="custom-image-map-viz.map_viz.mapImage">$image$</option>
<option name="custom-image-map-viz.map_viz.mapWidth">658</option>
<option name="custom-image-map-viz.map_viz.maxZoom">0</option>
<option name="custom-image-map-viz.map_viz.minZoom">0</option>
<option name="custom-image-map-viz.map_viz.multiplePopups">0</option>
<option name="custom-image-map-viz.map_viz.scrollWheelZoom">0</option>
<option name="custom-image-map-viz.map_viz.showPath">1</option>
<option name="custom-image-map-viz.map_viz.showPointerCoordinates">0</option>
<option name="custom-image-map-viz.map_viz.unfocusedOpacity">0.1</option>
<option name="drilldown">none</option>
<option name="height">804</option>
<option name="refresh.display">progressbar</option>
<option name="trellis.enabled">0</option>
<option name="trellis.scales.shared">1</option>
<option name="trellis.size">medium</option>
</viz>
</panel>
Is this possible ?? to change any Viz option based on a token?
Thanks
Hi,
Logically your code is correct.
If its not working, than the issue may be because of value mis-match of image and mapImage required value.
Let me know if any other details are required.
Accept & up-vote the answer if it helps.
happy splunking.....!!!!!!
Hi,
Logically your code is correct.
If its not working, than the issue may be because of value mis-match of image and mapImage required value.
Let me know if any other details are required.
Accept & up-vote the answer if it helps.
happy splunking.....!!!!!!
Hi @gaurav_maniar
Actually it's my bad after I had a big cup of coffee 😄 and reviewing my search query again I found the token was defined in a sub-search , so in the results it will come to the second row or the third in the table - depending on the order of the sub-search. so in that case token was getting null.
I have modified the token definition to be in the main search and it's working fine now,
Thanks for your reply my friend.
Happy Splunking to you too 😉